Fixed #5725 (FP: multicondition Expression is always false because 'else if' in pngwrite.cxx (LibreOffice))

This commit is contained in:
Frank Zingsheim 2014-04-26 11:59:38 +02:00 committed by Daniel Marjamäki
parent 853d56030b
commit ffa55bbaa0
2 changed files with 2 additions and 0 deletions

View File

@ -576,6 +576,7 @@ static void compileParAndBrackets(Token *&tok, std::stack<Token*> &op, unsigned
while (tok) { while (tok) {
if (tok->str() == "[") { if (tok->str() == "[") {
compileBinOp(tok, compileScope, op, depth); compileBinOp(tok, compileScope, op, depth);
tok = tok->next();
} else break; } else break;
} }
} }

View File

@ -10341,6 +10341,7 @@ private:
" | `-i\n" " | `-i\n"
" `-f\n", " `-f\n",
testAst("x = ((a[i]).f)();", true)); testAst("x = ((a[i]).f)();", true));
ASSERT_EQUALS("ifp*0[1==(", testAst("if((*p)[0]==1)"));
// casts // casts
ASSERT_EQUALS("a1(2(+=",testAst("a=(t)1+(t)2;")); ASSERT_EQUALS("a1(2(+=",testAst("a=(t)1+(t)2;"));