| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Some clients (eg the cling interpreter) need to recover their parser from
errors.
Patch by Axel Naumann (D31190)!
llvm-svn: 298606
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
is parsed.
That way we can take any trailing availability attributes into account.
rdar://problem/20713550
llvm-svn: 236241
|
|
|
|
|
|
| |
requiring the macro. NFC; Clang edition.
llvm-svn: 229339
|
|
|
|
|
|
| |
Modifications made by clang-tidy with minor tweaks.
llvm-svn: 215557
|
|
|
|
| |
llvm-svn: 209275
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Teach ExpectAndConsume() to emit expected and expected-after diagnostics
using the generic diagnostic descriptions added in r197972, eliminating another
set of trivial err_expected_* variations while maintaining existing behaviour.
2) Lift SkipUntil() recovery out of ExpectAndConsume(). The Expect/Consume
family of functions are primitive parser operations that now have the
well-defined property of operating on single tokens. Factoring out recovery
exposes opportunities for more consistent and tailored error recover at the
call sites instead of just relying on a bottled SkipUntil formula.
llvm-svn: 198270
|
|
|
|
|
|
|
|
|
|
|
| |
brackets and parens"
These parser changes were redundant. The same or better recovery can be
achieved with a one-line fix to SkipUntil() due to land in the next commit.
This reverts commit r197553.
llvm-svn: 197597
|
|
|
|
|
|
| |
parens
llvm-svn: 197553
|
|
|
|
| |
llvm-svn: 181683
|
|
|
|
|
|
|
|
|
|
|
| |
to control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting
levels for parentheses, brackets and braces.
Some code with heavy macro use exceeds the default limit of 256, but we don't
want to increase it generally to avoid stack overflow on stack-constrained
systems.
llvm-svn: 175855
|
|
|
|
| |
llvm-svn: 163983
|
|
|
|
|
|
| |
properties/ivars. <rdar://problem/6642337>.
llvm-svn: 161534
|
|
|
|
|
|
|
| |
where '>' is going to behave as an operator (and not as a '>' closing
a template argument list).
llvm-svn: 158111
|
|
|
|
|
|
|
|
|
|
| |
so that we actually accumulate all the delayed diagnostics. Do
this so that we can restore those diagnostics to good standing
if it turns out that we were wrong to suppress, e.g. if the
tag specifier is actually an elaborated type specifier and not
a declaration.
llvm-svn: 156291
|
|
|
|
|
|
|
| |
separate pools owned by the RAII objects that keep pushing
decl state. This gives us quite a bit more flexibility.
llvm-svn: 156289
|
|
|
|
| |
llvm-svn: 140478
|
|
|
|
|
|
|
|
| |
Patch authored by Sohail Somani.
Provide parsing and AST support for Windows structured exception handling.
llvm-svn: 130366
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
part of parser recovery. For example, given:
a method1:arg];
we detect after parsing the expression "a" that we have the start of a
message send expression. We pretend we've seen a '[' prior to the a,
then parse the remainder as a message send. We'll then give a
diagnostic+fix-it such as:
fixit-objc-message.m:17:3: error: missing '[' at start of message
send expression
a method1:arg];
^
[
The algorithm here is very simple, and always assumes that the open
bracket goes at the beginning of the message send. It also only works
for non-super instance message sends at this time.
llvm-svn: 113968
|
|
|
|
|
|
|
|
|
|
|
| |
In a line like:
(;
the semicolon leaves Parser:ParenCount unbalanced (it's 1 even though we stopped looking for a right paren).
This may affect later parsing and result in bad recovery for parsing errors.
llvm-svn: 106213
|
|
|
|
| |
llvm-svn: 91067
|
|
|
|
|
|
| |
a better diagnostic in the second example.
llvm-svn: 91040
|
|
|
|
|
|
|
| |
TODOs for other classes that could be moved out of Parser.h. I don't plan
to do these in the near term though.
llvm-svn: 91023
|
|
|
|
| |
llvm-svn: 91016
|
|
|
|
|
|
|
| |
to be a bool in Parser that is twiddled by the ColonProtectionRAIIObject
class. No functionality change.
llvm-svn: 91014
|
|
llvm-svn: 91008
|