summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/RAIIObjectsForParser.h
Commit message (Collapse)AuthorAgeFilesLines
* Publish RAIIObjectsForParser.h for external usage.Vassil Vassilev2017-03-231-447/+0
| | | | | | | | | Some clients (eg the cling interpreter) need to recover their parser from errors. Patch by Axel Naumann (D31190)! llvm-svn: 298606
* Add a new error for unexpected semi-colon before closing delimiter.Richard Trieu2015-05-121-1/+7
| | | | | | | | | 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
* Batch up access-related diagnostics on enum constants until the whole enum ↵Jordan Rose2015-04-301-0/+6
| | | | | | | | | | is parsed. That way we can take any trailing availability attributes into account. rdar://problem/20713550 llvm-svn: 236241
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-151-4/+4
| | | | | | requiring the macro. NFC; Clang edition. llvm-svn: 229339
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* [C++11] Use 'nullptr'. Parser edition.Craig Topper2014-05-211-6/+6
| | | | llvm-svn: 209275
* ExpectAndConsume: Diagnose errors automaticallyAlp Toker2014-01-011-2/+2
| | | | | | | | | | | | | | 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
* Revert "[OPENMP] Fix for parsing OpenMP directives with extra braces, ↵Alp Toker2013-12-181-4/+2
| | | | | | | | | | | 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
* [OPENMP] Fix for parsing OpenMP directives with extra braces, brackets and ↵Alexey Bataev2013-12-181-2/+4
| | | | | | parens llvm-svn: 197553
* OpenMP threadprivate with qualified names.Alexey Bataev2013-05-131-3/+4
| | | | llvm-svn: 181683
* Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,Richard Smith2013-02-221-1/+1
| | | | | | | | | | | 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
* Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.Dmitri Gribenko2012-09-151-5/+5
| | | | llvm-svn: 163983
* Handle deprecation diagnostics correctly for C struct fields and Objective-C ↵Eli Friedman2012-08-081-0/+22
| | | | | | properties/ivars. <rdar://problem/6642337>. llvm-svn: 161534
* Whenever we have a BalancedDelimiterTracker, we have a 'nested' scopeDouglas Gregor2012-06-061-0/+75
| | | | | | | where '>' is going to behave as an operator (and not as a '>' closing a template argument list). llvm-svn: 158111
* Change how we suppress access control in explicit instantiationsJohn McCall2012-05-071-6/+58
| | | | | | | | | | 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
* Refactor DelayedDiagnostics so that it keeps diagnostics inJohn McCall2012-05-071-3/+146
| | | | | | | separate pools owned by the RAII objects that keep pushing decl state. This gives us quite a bit more flexibility. llvm-svn: 156289
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-2/+2
| | | | llvm-svn: 140478
* Parsing/AST support for Structured Exception HandlingJohn Wiegley2011-04-281-1/+25
| | | | | | | | Patch authored by Sohail Somani. Provide parsing and AST support for Windows structured exception handling. llvm-svn: 130366
* Implement bracket insertion for Objective-C instance message sends asDouglas Gregor2010-09-151-0/+16
| | | | | | | | | | | | | | | | | | | | | | | 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
* Make sure parens/braces/brackets are correctly balanced.Argyrios Kyrtzidis2010-06-171-0/+17
| | | | | | | | | | | 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
* Privatize class members.Benjamin Kramer2009-12-101-2/+2
| | | | llvm-svn: 91067
* If we enter parens, colons can become un-sacred, allowing us to emitChris Lattner2009-12-101-2/+3
| | | | | | a better diagnostic in the second example. llvm-svn: 91040
* move GreaterThanIsOperatorScope into RAIIObjectsForParser. Add some moreChris Lattner2009-12-101-3/+21
| | | | | | | 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
* fix PR5740: a colon is sacred when parsing case statement expressions!Chris Lattner2009-12-101-1/+7
| | | | llvm-svn: 91016
* refactor the 'ColonIsSacred' argument to ParseOptionalCXXScopeSpecifierChris Lattner2009-12-101-1/+20
| | | | | | | to be a bool in Parser that is twiddled by the ColonProtectionRAIIObject class. No functionality change. llvm-svn: 91014
* rename ExtensionRAIIObject.h -> RAIIObjectsForParser.hChris Lattner2009-12-101-0/+41
llvm-svn: 91008
OpenPOWER on IntegriCloud