Commit 76469295 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

don't write pointless TokFuncTerminators into the stream



we are transforming "magic" function calls into other structures. past
that point it's wrong to keep the function argument list terminator in
the token stream. this went unnoticed, because in this context it was
equivalent with the expected value list terminator (which was simply
never reached).

Change-Id: I3dc6719273ce9d663db867f355eba682ba6ccf2c
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from qtbase/da1aaed059d8a871c7f9cef3980ed85c71df7323)
parent 04fdfd8b
...@@ -1034,10 +1034,12 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg ...@@ -1034,10 +1034,12 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg
} }
flushCond(tokPtr); flushCond(tokPtr);
putLineMarker(tokPtr); putLineMarker(tokPtr);
--ptr;
Q_ASSERT(*ptr == TokFuncTerminator);
if (*uce == (TokLiteral|TokNewStr)) { if (*uce == (TokLiteral|TokNewStr)) {
nlen = uce[1]; nlen = uce[1];
uc = uce + 2 + nlen; uc = uce + 2 + nlen;
if (*uc == TokFuncTerminator) { if (uc == ptr) {
// for(literal) (only "ever" would be legal if qmake was sane) // for(literal) (only "ever" would be legal if qmake was sane)
putTok(tokPtr, TokForLoop); putTok(tokPtr, TokForLoop);
putHashStr(tokPtr, (ushort *)0, (uint)0); putHashStr(tokPtr, (ushort *)0, (uint)0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment