forked from OSchip/llvm-project
c29c4835df
Fixes this snippet from SLi's afl fuzzer output: class { i (x = <, enum This parsed i as a function, x as a paramter, and the stuff after < as a template list. This then called TryConsumeDeclarationSpecifier() which called TryAnnotateCXXScopeToken() without checking the preconditions of this function. Check them before calling, like all other callers of TryAnnotateCXXScopeToken() do. A more readable reproducer that causes the same crash is class { void i(int x = MyTemplateClass<int, union int>::foo()); }; The reduced version used an eof token as surprising token, but kw_int works just as well to repro and is easier to insert into a test file. llvm-svn: 224906 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Makefile | ||
ParseAST.cpp | ||
ParseCXXInlineMethods.cpp | ||
ParseDecl.cpp | ||
ParseDeclCXX.cpp | ||
ParseExpr.cpp | ||
ParseExprCXX.cpp | ||
ParseInit.cpp | ||
ParseObjc.cpp | ||
ParseOpenMP.cpp | ||
ParsePragma.cpp | ||
ParseStmt.cpp | ||
ParseStmtAsm.cpp | ||
ParseTemplate.cpp | ||
ParseTentative.cpp | ||
Parser.cpp | ||
RAIIObjectsForParser.h |