aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/proparser
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-02-13 15:27:22 +0100
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-10-28 13:01:05 +0000
commit76469295b59b4f79a7cfb1bb20a9d519663297e7 (patch)
tree95f02df7dd9e3b340c59a2763c61a6a3aacc4a1e /src/shared/proparser
parent04fdfd8bfea13077b7b3a3e5dde3a5bfaa808ee2 (diff)
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: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> (cherry picked from qtbase/da1aaed059d8a871c7f9cef3980ed85c71df7323)
Diffstat (limited to 'src/shared/proparser')
-rw-r--r--src/shared/proparser/qmakeparser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shared/proparser/qmakeparser.cpp b/src/shared/proparser/qmakeparser.cpp
index 03d512cf14..e10ebb185b 100644
--- a/src/shared/proparser/qmakeparser.cpp
+++ b/src/shared/proparser/qmakeparser.cpp
@@ -1034,10 +1034,12 @@ void QMakeParser::finalizeCall(ushort *&tokPtr, ushort *uc, ushort *ptr, int arg
}
flushCond(tokPtr);
putLineMarker(tokPtr);
+ --ptr;
+ Q_ASSERT(*ptr == TokFuncTerminator);
if (*uce == (TokLiteral|TokNewStr)) {
nlen = uce[1];
uc = uce + 2 + nlen;
- if (*uc == TokFuncTerminator) {
+ if (uc == ptr) {
// for(literal) (only "ever" would be legal if qmake was sane)
putTok(tokPtr, TokForLoop);
putHashStr(tokPtr, (ushort *)0, (uint)0);