Tokenizer::simplifyVarDecl: Fixed crash when checking garbage code.
This commit is contained in:
parent
0dccd3a632
commit
5a5277f2fa
|
@ -5465,7 +5465,7 @@ void Tokenizer::simplifyVarDecl(Token * tokBegin, Token * tokEnd, bool only_k_r_
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (tok2)
|
||||
tok2 = tok2->next();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -997,6 +997,7 @@ private:
|
|||
|
||||
void garbageCode7() {
|
||||
tokenizeAndStringify("1 (int j) { return return (c) * sizeof } y[1];", /*simplify=*/true);
|
||||
tokenizeAndStringify("foo(Args&&...) fn void = { } auto template<typename... bar(Args&&...)", /*simplify=*/true);
|
||||
}
|
||||
|
||||
void simplifyFileAndLineMacro() { // tokenize 'return - __LINE__' correctly
|
||||
|
|
Loading…
Reference in New Issue