]> granicus.if.org Git - clang/commit
Add a new error for unexpected semi-colon before closing delimiter.
authorRichard Trieu <rtrieu@google.com>
Tue, 12 May 2015 21:36:35 +0000 (21:36 +0000)
committerRichard Trieu <rtrieu@google.com>
Tue, 12 May 2015 21:36:35 +0000 (21:36 +0000)
commit8a70ee0e8e5f935895036e8d3a25d3fd24b2a125
tree0732ca37b142f4bd41d653fd3a9b52ec146b75ac
parent4610137c1c437300551b0e1b92936dc28789d662
Add a new error for unexpected semi-colon before closing delimiter.

Previously, if a semi-colon is unexpectedly added before a closing ')', ']' or
'}', two errors and one note would emitted, and the parsing would get confused
to which scope it was in.  This change consumes the semi-colon, recovers
parsing better, and emits only one error with a fix-it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237192 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticParseKinds.td
lib/Parse/RAIIObjectsForParser.h
test/Parser/cxx-class.cpp
test/Parser/extra-semi.cpp [new file with mode: 0644]