summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser
Commit message (Collapse)AuthorAgeFilesLines
* PR8302: Check for shadowing a template parameter when declaring a templateRichard Smith2013-06-251-0/+13
| | | | | | template parameter. llvm-svn: 184884
* Add the global namespace (the "::" namespace specifier) to the list ofKaelyn Uhrain2013-06-241-2/+3
| | | | | | namespaces to try for potential typo corrections. llvm-svn: 184762
* Fix for PR 16367, display the name of a function in a diagnostic instead ofRichard Trieu2013-06-191-0/+8
| | | | | | showing "(null)". llvm-svn: 184377
* Recognition of empty structures and unions is moved to semantic stageSerge Pavlov2013-06-081-1/+2
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D586 llvm-svn: 183609
* Fix a typo (chek => check)Sylvestre Ledru2013-06-041-1/+1
| | | | llvm-svn: 183223
* Adding in parsing and the start of semantic support for __sptr and __uptr ↵Aaron Ballman2013-05-221-0/+11
| | | | | | | | | | pointer type qualifiers. This patch also fixes the correlated __ptr32 and __ptr64 pointer qualifiers so that they are truly type attributes instead of declaration attributes. For more information about __sptr and __uptr, see MSDN: http://msdn.microsoft.com/en-us/library/aa983399.aspx Patch reviewed by Richard Smith. llvm-svn: 182535
* PR16094: I should have known Obj-C init-capture disambiguation couldn't beRichard Smith2013-05-211-3/+13
| | | | | | | | | | | | | | | | | | | | | *that* easy... Try a bit harder to disambiguate. This is mostly straightforward, but for =-style initializers, we actually need to know where an expression ends: [foo = bar baz] is a message send, whereas [foo = bar + baz] is a lambda-introducer. Handle this by parsing the expression eagerly, and replacing it with an annotation token. By chance, we use the *exact same* parsing rules in both cases (except that we need to assume we're inside a message send for the parse, to turn off various forms of inapplicable error recovery). llvm-svn: 182432
* Objective-C parsing. Error recovery when category implementationFariborz Jahanian2013-05-171-0/+8
| | | | | | declaration is illegally protocol qualified. // rdar://13920026 llvm-svn: 182136
* First pass of semantic analysis for init-captures: check the initializer, buildRichard Smith2013-05-162-13/+13
| | | | | | | | | | | | | a FieldDecl from it, and propagate both into the closure type and the LambdaExpr. You can't do much useful with them yet -- you can't use them within the body of the lambda, because we don't have a representation for "the this of the lambda, not the this of the enclosing context". We also don't have support or a representation for a nested capture of an init-capture yet, which was intended to work despite not being allowed by the current standard wording. llvm-svn: 181985
* C++1y n3648: parse and reject init-captures for now.Richard Smith2013-05-092-0/+28
| | | | llvm-svn: 181553
* Properly parsing __declspec(safebuffers), though there is no semantic ↵Aaron Ballman2013-05-041-1/+1
| | | | | | hookup. For more information about safebuffers, see MSDN: http://msdn.microsoft.com/en-us/library/dd778695(v=vs.110).aspx llvm-svn: 181123
* Objective-C parsing [qoi]: Recover gracefully with good diagnosticFariborz Jahanian2013-04-241-0/+21
| | | | | | | when class implementation declaration adds protocol qualifier list. // rdar://12233858 llvm-svn: 180228
* The 'constexpr implies const' rule for non-static member functions is gone inRichard Smith2013-04-212-4/+4
| | | | | | | | | C++1y, so stop adding the 'const' there. Provide a compatibility warning for code relying on this in C++11, with a fix-it hint. Update our lazily-written tests to add the const, except for those ones which were testing our implementation of this rule. llvm-svn: 179969
* Objective-C++: Enable passing of modern C++11 style Fariborz Jahanian2013-04-181-0/+38
| | | | | | | initialized temporaries to objc++ methods. // rdar://12788429 llvm-svn: 179818
* Objective-C parsing [qoi]: Provide good recovery whenFariborz Jahanian2013-04-181-0/+8
| | | | | | | Objective-C dictionary literals has bad syntax for the separator. // rdar://10679157 llvm-svn: 179784
* [Parser] Handle #pragma pack/align inside C structs.Argyrios Kyrtzidis2013-04-182-0/+26
| | | | | | Fixes PR13580. Patch by Serge Pavlov! llvm-svn: 179743
* Parser support for #pragma clang __debug capturedTareq A. Siraj2013-04-161-0/+14
| | | | | | | | | | | | | | | This patch implements parsing ‘#pragma clang __debug’ as a first step for implementing captured statements. Captured statements are a mechanism for doing outlining in the AST. see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html. Currently returns StmtEmpty Author: Andy Zhang <andy.zhang@intel.com> Differential Revision: http://llvm-reviews.chandlerc.com/D369 llvm-svn: 179614
* Basic support for Microsoft property declarations andJohn McCall2013-04-161-0/+29
| | | | | | | | references thereto. Patch by Tong Shen! llvm-svn: 179585
* Give this test a triple so that its use of thread_local doesn't make it fail ↵Richard Smith2013-04-131-1/+1
| | | | | | on the MSVC bot. llvm-svn: 179432
* Parsing support for thread_local and _Thread_local. We give them the sameRichard Smith2013-04-121-2/+1
| | | | | | semantics as __thread for now. llvm-svn: 179424
* Make the ObjC attributes diagnostics a bit more informative.Nico Weber2013-04-041-5/+5
| | | | llvm-svn: 178720
* Emit a nicer diagnostic for misplaced attributes on ObjC directives.Nico Weber2013-04-032-8/+25
| | | | llvm-svn: 178670
* Support C11 _Atomic type qualifier. This is more-or-less just syntactic ↵Richard Smith2013-03-282-0/+41
| | | | | | sugar for the _Atomic type specifier. llvm-svn: 178210
* Try harder to be signal-safe inside our signal handler. The most prominent ↵Nick Lewycky2013-03-251-0/+9
| | | | | | | | | | behavioural difference is that we no longer clean the token before emitting it. This fixes a bug where clang hangs in the middle of crashing because the crash handler calls malloc from inside a crash that happened inside of free. llvm-svn: 177919
* Do the error recovery for @end only.Fariborz Jahanian2013-03-201-9/+0
| | | | | | | | I am not sure how much we can improve for when a randon ObjC keyword is thrown into the ivar decl. block. // rdar://6854840 llvm-svn: 177553
* Objective-C [qoi] more gracefull recovery when Fariborz Jahanian2013-03-201-4/+10
| | | | | | | '}' is missing for the ivar declarations. // rdar://6854840 llvm-svn: 177549
* Teach statement / declaration disambiguation about C++11-style generalized ↵Richard Smith2013-03-201-0/+16
| | | | | | initializers. llvm-svn: 177480
* Objective-C [qoi]: Provide improved parse diagnostics whenFariborz Jahanian2013-03-191-0/+6
| | | | | | | | | closing rbrace is missing in an ObjC class declaration. Can do beter than this, but it involves addition of overhead which will be present in correct code. // rdar://6854840 llvm-svn: 177435
* Add missing diagnostic for a nested-name-specifier on a free-standing type ↵Richard Smith2013-03-182-1/+16
| | | | | | definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations. llvm-svn: 177335
* Add quotation marks to template names in diagnostics.David Blaikie2013-03-051-3/+3
| | | | llvm-svn: 176474
* Fix warning text of my last patch.Fariborz Jahanian2013-02-281-1/+1
| | | | | | // rdar://13158394 llvm-svn: 176308
* objective-C: clang, following gcc, warns onFariborz Jahanian2013-02-281-1/+1
| | | | | | | | use of stand-alone protocol as type and uses id<proto>. Modify warning to say what compiler is doing. // rdar//13158394 llvm-svn: 176303
* [Sema] Semantic analysis for empty-declaration and attribute-declaration.Michael Han2013-02-221-1/+2
| | | | | | | | Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these attributes can be sema checked just as attributes attached to "normal" declarations. llvm-svn: 175900
* Don't accidentally and silently accept C++11 attributes in decl-specifier-seqsRichard Smith2013-02-221-0/+3
| | | | | | in C++98. llvm-svn: 175879
* Per the grammar in [dcl.dcl]p1, a simple-declaration can only have attributesRichard Smith2013-02-221-0/+5
| | | | | | if it has declarators. We were missing the check for this in a couple of places. llvm-svn: 175876
* Don't skip '_Alignas' when disambiguating 'final'. '_Alignas' can't appear here,Richard Smith2013-02-221-0/+3
| | | | | | and we used to assert if it did. llvm-svn: 175866
* Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,Richard Smith2013-02-221-1/+13
| | | | | | | | | | | 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
* PR15311: Finish implementation of the suggested resolution of core issue 1488,Richard Smith2013-02-201-1/+4
| | | | | | | | which allows grouping parens in an abstract-pack-declarator. This was already mostly implemented, but missed some cases. Add an ExtWarn for use of this extension until CWG ratifies it. llvm-svn: 175660
* Process and handle attributes on conditions and for loop variables. Process andRichard Smith2013-02-201-6/+16
| | | | | | | diagnose attributes on alias declarations, using directives, and attribute declarations. llvm-svn: 175649
* PR15300: Support C++11 attributes on base-specifiers. We don't support any suchRichard Smith2013-02-193-22/+32
| | | | | | | | attributes yet, so just issue the appropriate diagnostics. Also generalize the fixit for attributes-in-the-wrong-place code and reuse it here, if attributes are placed after the access-specifier or 'virtual' in a base specifier. llvm-svn: 175575
* 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
OpenPOWER on IntegriCloud