]> granicus.if.org Git - clang/commit
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)
commit00ba534163277c871bd74e91b86aa5f079d6d0af
tree9783d3250304023eeab0e08253eced8aab96502a
parent3022dac388832e0bb669821e6677abd5cb8a8784
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303372 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/clang/Parse/Parser.h
lib/Parse/ParseCXXInlineMethods.cpp
lib/Parse/ParseDecl.cpp
lib/Parse/ParseDeclCXX.cpp
lib/Parse/ParseExpr.cpp
lib/Parse/ParseExprCXX.cpp
lib/Parse/ParseOpenMP.cpp
lib/Parse/ParsePragma.cpp
lib/Parse/ParseStmt.cpp
lib/Parse/ParseTemplate.cpp
lib/Parse/ParseTentative.cpp
lib/Parse/Parser.cpp
test/Parser/cxx0x-decl.cpp