summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/extra-semi.cpp
Commit message (Collapse)AuthorAgeFilesLines
* P0305R1: Parsing support for init-statements in 'if' and 'switch' statements.Richard Smith2016-06-291-1/+0
| | | | | | | | | | | | | | | | | | No semantic analysis yet. This is a pain to disambiguate correctly, because the parsing rules for the declaration form of a condition and of an init-statement are quite different -- for a token sequence that looks like a declaration, we frequently need to disambiguate all the way to the ')' or ';'. We could do better here in some cases by stopping disambiguation once we've decided whether we've got an expression or not (rather than keeping going until we know whether it's an init-statement declaration or a condition declaration), by unifying our parsing code for the two types of declaration and moving the syntactic checks into Sema; if this has a measurable impact on parsing performance, I'll look into that. llvm-svn: 274169
* Add a new error for unexpected semi-colon before closing delimiter.Richard Trieu2015-05-121-0/+14
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. llvm-svn: 237192
OpenPOWER on IntegriCloud