Fix the location of "missing ';'" suggestions after annotation tokens.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 18 May 2017 19:21:48 +0000 (19:21 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 18 May 2017 19:21:48 +0000 (19:21 +0000)
commitaf3b3256270ca41eb0ab5e8d0af1ba2e0d698689
treeca7d1a7b292e115cff4c6cc778533a0414a3aec3
parent03638d091a90f0e683637d2abfe678a3f274427a
Fix the location of "missing ';'" suggestions after annotation tokens.

We were incorrectly setting PrevTokLocation to the first token in the
annotation token instead of the last when consuming it. To fix this without
adding a complex switch to the hot path through ConsumeToken, we now have a
ConsumeAnnotationToken function for consuming annotation tokens in addition
to the other Consume*Token special case functions.

llvm-svn: 303372
13 files changed:
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseCXXInlineMethods.cpp
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Parse/ParseExpr.cpp
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Parse/ParsePragma.cpp
clang/lib/Parse/ParseStmt.cpp
clang/lib/Parse/ParseTemplate.cpp
clang/lib/Parse/ParseTentative.cpp
clang/lib/Parse/Parser.cpp
clang/test/Parser/cxx0x-decl.cpp