summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
Commit message (Collapse)AuthorAgeFilesLines
* PR15132: Replace "address expression must be an lvalue or a functionRichard Smith2013-02-021-1/+1
| | | | | | | | | | | | | | designator" diagnostic with more correct and more human-friendly "cannot take address of rvalue of type 'T'". For the case of & &T::f, provide a custom diagnostic, rather than unhelpfully saying "cannot take address of rvalue of type '<overloaded function type>'". For the case of &array_temporary, treat it just like a class temporary (including allowing it as an extension); the existing diagnostic wording for the class temporary case works fine. llvm-svn: 174262
* Downgrade 'attribute ignored when parsing type' from error to warning, to matchRichard Smith2013-01-292-4/+6
| | | | | | | | | the diagnostic's warn_ name. Switch some places (notably C++11 attributes) which really wanted an error over to a different diagnostic. Finally, suppress the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing diagnostics in important system headers. llvm-svn: 173788
* Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas.Richard Smith2013-01-291-1/+1
| | | | llvm-svn: 173779
* PR15017: A '>' can appear after a type-specifier in a template-argument-list.Richard Smith2013-01-291-0/+4
| | | | | | | It turns out that there's no correctness bug here (because we can't have a type definition in this location), but there was a diagnostic bug. llvm-svn: 173766
* Treat alignas and _Alignas as keyword attributes. This allows us toRichard Smith2013-01-291-1/+1
| | | | | | | pretty-print them properly (modulo the more general badness in alignment attribute printing). llvm-svn: 173752
* Give a more informative error message when the dot or arrow operator is usedRichard Trieu2013-01-261-0/+18
| | | | | | | on a type. Currently, it gives a generic "expected unqualified-id" error. The new error message is "cannot use (dot|arrow) operator on a type". llvm-svn: 173556
* Temporarily disabling ms-asm testRenato Golin2013-01-251-0/+1
| | | | llvm-svn: 173510
* Fail these tests in a way that doesn't cause unexpected successes, per Daniel'sChad Rosier2013-01-241-0/+1
| | | | | | suggestion. llvm-svn: 173367
* Add a triple, per Ben's suggestion.Chad Rosier2013-01-221-2/+1
| | | | llvm-svn: 173198
* Second attempt to fix ppc bots.Chad Rosier2013-01-221-1/+1
| | | | llvm-svn: 173193
* Add x86 requirement to hopefully fix ppc bots.Chad Rosier2013-01-221-0/+1
| | | | llvm-svn: 173190
* [ms-inline asm] Remove a warning about ms-style inline assembly not beingChad Rosier2013-01-222-15/+15
| | | | | | supported. llvm-svn: 173177
* Fix five more cases of tokens which can legally follow a type specifier.Richard Smith2013-01-192-1/+38
| | | | llvm-svn: 172886
* Fix parsing of class specifiers before '\n' 'operator'.Nico Weber2013-01-181-0/+18
| | | | | | | | | | | | | r159549 / r159164 regressed clang to reject struct s {}; struct s operator++(struct s a) { return a; } This fixes the regression. Richard, pleas check if this looks right. llvm-svn: 172834
* Parsing support for C11's _Noreturn keyword. No semantics yet.Richard Smith2013-01-171-0/+14
| | | | llvm-svn: 172761
* Implement C++11 semantics for [[noreturn]] attribute. This required splittingRichard Smith2013-01-172-5/+8
| | | | | | | | it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as affecting the function type, whereas [[noreturn]] does not). llvm-svn: 172691
* Add a test for -Wsemicolon-before-method-body fixitDmitri Gribenko2013-01-151-0/+22
| | | | llvm-svn: 172545
* PR14918: Don't confuse braced-init-lists after template variable declarationsRichard Smith2013-01-151-0/+11
| | | | | | | | | | | with function definitions. We really should remove Parser::isDeclarationAfterDeclarator entirely, since it's meaningless in C++11 (an open brace could be either a function definition or an initializer, which is what it's trying to differentiate between). The other caller of it happens to be correct right now... llvm-svn: 172510
* Fix behavior of [[gnu::]] function attributes. Per g++'s behavior, theseRichard Smith2013-01-151-1/+1
| | | | | | | | | | | attributes appertain to a declaration, even though they would be much more naturally modelled as appertaining to a function type. Previously, we would try to distribute them from the declarator to the function type, then reject them for being at an incorrect location. Now, we just distribute them as far as the declarator; the existing attribute handling code can actually apply them there just fine. llvm-svn: 172504
* Accept [[gnu::*]] for all __attribute__((*))s which are:Richard Smith2013-01-141-3/+7
| | | | | | | | | | | 1) Supported by Clang, and 2) Supported by GCC, and 3) Documented in GCC's manual. g++ allows its C++11-style attributes to appertain only to the entity being declared, and never to a type (even for a type attribute), so we do the same. llvm-svn: 172382
* *this is const in a trailing-return-type for a constexpr member function.Richard Smith2013-01-141-0/+8
| | | | llvm-svn: 172375
* PR14855: don't silently swallow a nested-name-specifier after a type name.Richard Smith2013-01-081-0/+2
| | | | llvm-svn: 171908
* Add fixit hints for misplaced C++11 attributes around class specifiers.Michael Han2013-01-071-1/+0
| | | | | | | | | | Following r168626, in class declaration or definition, there are a combination of syntactic locations where C++11 attributes could appear, and among those the only valid location permitted by standard is between class-key and class-name. So for those attributes appear at wrong locations, fixit is used to move them to expected location and we recover by applying them to the class specifier. llvm-svn: 171757
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-181-2/+0
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-181-14/+16
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-181-16/+14
| | | | llvm-svn: 170428
* Don't require a space between the two ">" in "vector<id<protocol>>" in objc++11.Nico Weber2012-12-141-0/+15
| | | | | | | | C++11 allowed writing "vector<vector<int>>" without a space between the two ">". This change allows this for protocols in template lists too in -std=c++11 mode, and improves the diagnostic in c++98 mode. llvm-svn: 170223
* PR14549. Don't assert if we see an incomplete decltype specifier at the end ↵Richard Smith2012-12-091-0/+3
| | | | | | of the file. llvm-svn: 169688
* [driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks languageChad Rosier2012-12-051-0/+9
| | | | | | | | option. MS-style inline asm can now be enabled by either -fasm-blocks or -fms-extensions. rdar://12808010 llvm-svn: 169445
* [driver, ms-inline asm] MS-Style inline assembly is controlled by theChad Rosier2012-12-052-10/+1
| | | | | | | -fasm-blocks flag, not the -fms-extensions flag. rdar://12808010 llvm-svn: 169422
* In C++, if we hit an error in the class-head, don't try to parse the class body.Richard Smith2012-12-052-2/+7
| | | | | | | Our error recovery path may have made the class anonymous, and that has a pretty disastrous impact on any attempt to parse a class body containing constructors. llvm-svn: 169374
* Implement C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq ↵Michael Han2012-11-281-1/+7
| | | | | | appertains to a friend declaration, that declaration shall be a definition. llvm-svn: 168826
* Improve diagnostic on C++11 attribute specifiers that appear at wrong ↵Michael Han2012-11-261-0/+23
| | | | | | | | | | | | | syntactic locations around class specifiers. This change list implemented logic that explicitly detects several combinations of locations where C++11 attribute specifiers might be incorrectly placed within a class specifier. Previously we emit generic diagnostics like "expected identifier" for such cases; now we emit specific diagnostic against the misplaced attributes, this also fixed a bug in old code where attributes appear at legitimate locations were incorrectly rejected. Thanks to Richard Smith for reviewing! llvm-svn: 168626
* Made the "expected string literal" diagnostic more expressiveAndy Gibbs2012-11-171-1/+1
| | | | llvm-svn: 168267
* PR9903: Recover from a member functon declared with the 'typedef' specifier byRichard Smith2012-11-152-1/+14
| | | | | | | dropping the specifier, just like we do for non-member functions and function templates declared 'typedef'. Patch by Brian Brooks! llvm-svn: 168108
* Teach Clang parser to reject C++11 attributes that appertain to declaration ↵Michael Han2012-11-061-0/+7
| | | | | | | | | specifiers. We don't support any C++11 attributes that appertain to declaration specifiers so reject the attributes in parser until we support them; this also conforms to what g++ 4.8 is doing. llvm-svn: 167481
* Our style for diagnostic messages is to not include a trailing dot.Matt Beaumont-Gay2012-11-051-1/+1
| | | | llvm-svn: 167379
* Test case for r167363.Lang Hames2012-11-041-0/+5
| | | | llvm-svn: 167369
* Fix test cases I broken when fixing grammar in diagnostic message.Richard Trieu2012-11-021-8/+8
| | | | llvm-svn: 167320
* When finding a '(' after '::', emit error with hint to remove '(' and matchingRichard Trieu2012-11-021-0/+22
| | | | | | | ')', if found. Don't crash. Fixes PR11852. llvm-svn: 167268
* Fix crash on missing namespace name in namespace alias definition -- PR14085.Nico Weber2012-10-271-0/+4
| | | | | | Patch from Brian Brooks <brooks.brian@gmail.com>! llvm-svn: 166893
* Correct test inovocations to use %clang_cc1 rather than direct invocation ↵David Tweed2012-10-251-1/+1
| | | | | | (so that it can have additional options set when trying to debug issues causing regressions). llvm-svn: 166681
* 'constexpr' and 'friend' are both declaration specifiers. Teach the parser ↵Richard Smith2012-10-251-1/+4
| | | | | | this, for better error recovery. llvm-svn: 166645
* Update regression tests for r166617.Eli Friedman2012-10-241-1/+1
| | | | llvm-svn: 166619
* Fix typo, make test case slightly more reabable. Thanks to Dmitri Gribenko forLang Hames2012-10-211-1/+2
| | | | | | the suggestions. llvm-svn: 166400
* When used in a compound expression FP_CONTRACT should proceed all explicitLang Hames2012-10-211-0/+6
| | | | | | | declarations and statements. Emit an error if the FP_CONTRACT is used later in a compound statement. llvm-svn: 166383
* DR1473: Do not require a space between operator"" and the ud-suffix in aRichard Smith2012-10-201-1/+2
| | | | | | literal-operator-id. llvm-svn: 166373
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-1921-0/+21
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* DR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all.Richard Smith2012-10-171-6/+8
| | | | llvm-svn: 166152
* Handle a "#pragma options align" inside a class.Argyrios Kyrtzidis2012-10-121-0/+5
| | | | llvm-svn: 165810
OpenPOWER on IntegriCloud