Attempt to fix crashs on clang test suite.
This commit is contained in:
parent
00044aabb0
commit
428f7a6f26
|
@ -594,7 +594,9 @@ void CheckOther::checkRedundantAssignment()
|
||||||
writtenArgumentsEnd = 0;
|
writtenArgumentsEnd = 0;
|
||||||
|
|
||||||
if (tok->str() == "?" && tok->astOperand2()) {
|
if (tok->str() == "?" && tok->astOperand2()) {
|
||||||
tok = Token::findsimplematch(tok->astOperand2(), ";");
|
tok = Token::findmatch(tok->astOperand2(), ";|}");
|
||||||
|
if (!tok)
|
||||||
|
break;
|
||||||
varAssignments.clear();
|
varAssignments.clear();
|
||||||
memAssignments.clear();
|
memAssignments.clear();
|
||||||
} else if (tok->str() == "{" && tok->strAt(-1) != "{" && tok->strAt(-1) != "=" && tok->strAt(-4) != "case" && tok->strAt(-3) != "default") { // conditional or non-executable inner scope: Skip it and reset status
|
} else if (tok->str() == "{" && tok->strAt(-1) != "{" && tok->strAt(-1) != "=" && tok->strAt(-4) != "case" && tok->strAt(-3) != "default") { // conditional or non-executable inner scope: Skip it and reset status
|
||||||
|
|
Loading…
Reference in New Issue