summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
Commit message (Collapse)AuthorAgeFilesLines
...
* A static_assert declaration cannot be a template; adding the diagnostic for ↵Aaron Ballman2014-08-042-3/+12
| | | | | | this instead of silently accepting and producing possibly-unexpected behavior. llvm-svn: 214770
* Diagnose GNU-style attributes preceding virt-specifiers, but only when the ↵Aaron Ballman2014-08-041-3/+12
| | | | | | | | attribute is known to GCC. Clang accepts attributes in this position, but GCC does not, so this is a GCC-compat warning. If the attribute is not known to GCC, then the diagnostic is suppressed. llvm-svn: 214730
* Initializing the loop hint option token again.Aaron Ballman2014-08-011-0/+1
| | | | llvm-svn: 214504
* Initializing the loop hint option token.Aaron Ballman2014-08-011-1/+3
| | | | llvm-svn: 214502
* Loop hint pragmas sometimes do not contain an identifier option (such as ↵Aaron Ballman2014-07-311-1/+5
| | | | | | | | #pragma unroll(4)). Check explicitly that the token we stored was an identifier. Amends r214432 llvm-svn: 214446
* Add a state variable to the loop hint attribute.Tyler Nowicki2014-07-312-45/+74
| | | | | | | | | | This patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler. Resubmit with changes to try to fix the build-bot issue. Reviewed by Aaron Ballman llvm-svn: 214432
* Revert r214333, "Add a state variable to the loop hint attribute."NAKAMURA Takumi2014-07-312-73/+45
| | | | | | It brought undefined behavior. llvm-svn: 214376
* Add a state variable to the loop hint attribute.Tyler Nowicki2014-07-302-45/+73
| | | | | | | | This patch is necessary to support constant expressions which replaces the integer value in the loop hint attribute with an expression. The integer value was also storing the pragma’s state for options like vectorize(enable/disable) and the pragma unroll and nounroll directive. The state variable is introduced to hold the state of those options/pragmas. This moves the validation of the state (keywords) from SemaStmtAttr handler to the loop hint annotation token handler. Reviewed by Aaron Ballman llvm-svn: 214333
* Fix default argument comma disambiguation bug following the 'template' keyword.Richard Smith2014-07-271-0/+1
| | | | llvm-svn: 214051
* Wrap to 80 columns, no functionality change.Nico Weber2014-07-261-2/+2
| | | | llvm-svn: 214036
* Parse: Don't crash on trailing whitespace before EOFDavid Majnemer2014-07-261-1/+4
| | | | | | | | | | | | | | | Parser::ParseDeclarationSpecifiers eagerly updates the source range of the DeclSpec with the current token position. However, it might not consume any more tokens. Fix this by only setting the start of the range, not the end. This way the SourceRange will be invalid if we don't consume any more tokens. This fixes PR20413. Differential Revision: http://reviews.llvm.org/D4646 llvm-svn: 214018
* Revert r213437Warren Hunt2014-07-251-40/+8
| | | | | | | We no longer plan to use __except_hander3 and rather use custom personality functions per __try block. llvm-svn: 213971
* clang-cl: Merge adjacent single-line __asm blocksEhsan Akhgari2014-07-251-9/+20
| | | | | | | | | | | | | | | | | Summary: This patch extends the __asm parser to make it keep parsing input tokens as inline assembly if a single-line __asm line is followed by another line starting with __asm too. It also makes sure that we correctly keep matching braces in such situations by separating the notions of how many braces we are matching and whether we are in single-line asm block mode. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4598 llvm-svn: 213916
* Add support for #pragma nounroll.Mark Heffernan2014-07-241-9/+22
| | | | llvm-svn: 213885
* [OPENMP] Initial parsing and sema analysis for clause 'seq_cst' of 'atomic' ↵Alexey Bataev2014-07-241-1/+2
| | | | | | directive. llvm-svn: 213846
* [OPENMP] Initial parsing and sema analysis for clause 'capture' in 'atomic' ↵Alexey Bataev2014-07-241-1/+2
| | | | | | directive. llvm-svn: 213842
* In unroll pragma syntax and loop hint metadata, change "enable" forms to a ↵Mark Heffernan2014-07-231-7/+12
| | | | | | new form using the string "full". llvm-svn: 213771
* [OPENMP] Initial parsing and sema analysis for 'update' clause of 'atomic' ↵Alexey Bataev2014-07-231-1/+3
| | | | | | directive. llvm-svn: 213735
* [OPENMP] Initial parsing an sema analysis for 'write' clause of 'atomic' ↵Alexey Bataev2014-07-231-1/+6
| | | | | | directive. llvm-svn: 213728
* [OPENMP] Initial parsing and sema analysis for 'read' clause in 'atomic' ↵Alexey Bataev2014-07-231-1/+5
| | | | | | directive. llvm-svn: 213717
* Disallowing GNU-style attributes in new expressions, since they are ↵Aaron Ballman2014-07-222-19/+28
| | | | | | prohibited by GCC as well. llvm-svn: 213650
* [OPENMP] Initial parsing and sema analysis for 'atomic' directive.Alexey Bataev2014-07-221-2/+4
| | | | llvm-svn: 213639
* [OPENMP] Initial parsing and sema analysis for 'ordered' directive.Alexey Bataev2014-07-221-2/+5
| | | | llvm-svn: 213616
* Avoid crash if default argument parsed with errors.Serge Pavlov2014-07-222-3/+4
| | | | | | | | | | | | | | If function parameters have default values, and that of the second parameter is parsed with errors, function declaration would have a parameter without default value that follows a parameter with that. Such declaration breaks logic of selecting overloaded function. As a solution, put opaque object as default value in such case. This patch fixes PR20055. Differential Revision: http://reviews.llvm.org/D4378 llvm-svn: 213594
* -fms-extensions: Implement half of #pragma init_segReid Kleckner2014-07-222-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This pragma is very rare. We could *hypothetically* lower some uses of it down to @llvm.global_ctors, but given that GlobalOpt isn't able to optimize prioritized global ctors today, there's really no point. If we wanted to do this in the future, I would check if the section used in the pragma started with ".CRT$XC" and had up to two characters after it. Those two characters could form the 16-bit initialization priority that we support in @llvm.global_ctors. We would have to teach LLVM to lower prioritized global ctors on COFF as well. This should let us compile some silly uses of this pragma in WebKit / Blink. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4549 llvm-svn: 213593
* Add support for '#pragma unroll'.Mark Heffernan2014-07-212-61/+163
| | | | llvm-svn: 213574
* [OPENMP] Initial parsing and sema analysis for 'flush' directive.Alexey Bataev2014-07-211-7/+28
| | | | llvm-svn: 213512
* [OPENMP] Parsing/Sema of the OpenMP directive 'critical'.Alexander Musman2014-07-211-4/+21
| | | | llvm-svn: 213510
* [MS-ABI] Assign SEH handler indices to __try blocksWarren Hunt2014-07-191-8/+40
| | | | | | | | | Assigns indices to try blocks. These indices will used in constructing tables that the mscrt function __except_handler3 reads during SEH. Testing will occur once we actually emit the tables, in a subsequent patch. llvm-svn: 213437
* [OPENMP] Initial parsing and sema analysis for 'taskwait' directive.Alexey Bataev2014-07-182-7/+4
| | | | llvm-svn: 213363
* [OPENMP] Initial parsing and sema analysis for 'barrier' directive.Alexey Bataev2014-07-181-1/+3
| | | | llvm-svn: 213360
* [OPENMP] Initial parsing and sema analysis of 'taskyield' directive.Alexey Bataev2014-07-182-4/+14
| | | | llvm-svn: 213355
* Parse: Diagnose malformed 'message' arguments for 'availability' attrDavid Majnemer2014-07-181-1/+12
| | | | | | | The parsing code for 'availability' wasn't prepared for string literals like "a" L"b" showing up. Error if this occurs. llvm-svn: 213350
* Fix parsing certain kinds of strings in the MS section pragmasReid Kleckner2014-07-181-50/+99
| | | | | | | | | We were crashing on the relevant test case inputs. Also, refactor this code a bit so we can report failure and slurp the pragma tokens without returning a diagnostic id. This is more consistent with the rest of the parser and sema code. llvm-svn: 213337
* Wrap a comment to 80 columns, no code change.Nico Weber2014-07-171-1/+2
| | | | llvm-svn: 213288
* [OPENMP] Initial parsing and sema analysis of 'mergeable' clause.Alexey Bataev2014-07-171-1/+6
| | | | llvm-svn: 213262
* [OPENMP] Initial support for parsing and sema analysis of 'untied' clause.Alexey Bataev2014-07-171-1/+5
| | | | llvm-svn: 213257
* [OPENMP] Parsing/Sema analysis of directive 'master'Alexander Musman2014-07-171-2/+4
| | | | llvm-svn: 213237
* [OPENMP] Initial parsing and sema analysis for 'final' clause.Alexey Bataev2014-07-171-6/+13
| | | | llvm-svn: 213232
* Removing a FIXME from the attribute parsing code by now passing along the ↵Aaron Ballman2014-07-161-31/+35
| | | | | | scope and syntax information for attributes with custom parsing. It turns out not to matter too much because the FIXME wasn't quite true -- none of these attributes have a C++11 spelling. However, it's still a good change (for instance, we may add an attribute with a type arg in the future for which this code now behaves properly). llvm-svn: 213191
* Improve error recovery around colon.Serge Pavlov2014-07-162-24/+34
| | | | | | | | | | | | Recognize additional cases, when '::' is mistyped as ':'. This is a fix to RP18587 - colons have too much protection in member-declarations Review is tracked by http://reviews.llvm.org/D3653. This is an attempt to recommit the fix, initially committed as r212957 but then reverted in r212965 as it broke self-build. In the updated patch ParseDirectDeclarator turns on colon protection in for context as well. llvm-svn: 213120
* Don't get confused on the number of braces when braces start after the first ↵Ehsan Akhgari2014-07-151-2/+1
| | | | | | | | | | | | | | | | __asm Summary: Without this, we would not consume the closing brace which would cause the parser to start consuming C++ and bad things would happen. Reviewers: majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4505 llvm-svn: 213032
* PR19751: (T())++ is not a cast-expression.Richard Smith2014-07-152-2/+6
| | | | llvm-svn: 213022
* Continue parsing an expression list even after an error is encountered.Kaelyn Takata2014-07-141-5/+8
| | | | | | | | | Otherwise, multiple errors such as having unknown identifiers for two arguments won't be diagnosed properly (e.g. only the first one would have a diagnostic message if typo correction fails even though both would be diagnosed if typo correction suggests a replacement). llvm-svn: 213003
* Revert "Improve error recovery around colon."Reid Kleckner2014-07-142-31/+24
| | | | | | | | This reverts commit r212957. It broke the self-host on code like this from LLVM's option library: for (auto Arg: filtered(Id0, Id1, Id2)) llvm-svn: 212965
* Improve error recovery around colon.Serge Pavlov2014-07-142-24/+31
| | | | | | | | | Recognize additional cases, when '::' is mistyped as ':'. This is a fix to RP18587 - colons have too much protection in member-declarations. Differential Revision: http://reviews.llvm.org/D3653 llvm-svn: 212957
* [CMake] Reorder libdeps by alphabetical order.NAKAMURA Takumi2014-07-141-2/+2
| | | | llvm-svn: 212919
* [OPENMP] Parsing and sema analysis for 'omp task' directive.Alexey Bataev2014-07-111-8/+4
| | | | llvm-svn: 212804
* [OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.Alexey Bataev2014-07-081-2/+8
| | | | llvm-svn: 212516
* [OPENMP] Added initial support for 'omp parallel for'.Alexey Bataev2014-07-071-8/+26
| | | | llvm-svn: 212453
OpenPOWER on IntegriCloud