summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-class.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash on access decls with invalid scope specifier, PR20887.Nico Weber2014-09-101-0/+5
| | | | llvm-svn: 217472
* Add error, recovery and fixit for "~A::A() {...}".Richard Smith2014-09-061-0/+14
| | | | llvm-svn: 217302
* PR20760: Don't assert (and produce better diagnostics) if a default initializerRichard Smith2014-08-271-0/+11
| | | | | | contains an unmatched closing bracket token. llvm-svn: 216518
* Reject virt-specifiers on friend declarations. Give anonymous bitfields aRichard Smith2014-08-121-0/+10
| | | | | | location so their diagnostics have somewhere to point. llvm-svn: 215416
* Improve diagnostics for malformed constructor declarations (where lookup forRichard Smith2014-03-031-1/+17
| | | | | | the type of the first parameter fails, and it is the only, unnamed, parameter). llvm-svn: 202759
* Avoid extra error messages if method definition is inside function.Serge Pavlov2013-12-091-0/+10
| | | | llvm-svn: 196757
* Add missing diagnostic for a nested-name-specifier on a free-standing type ↵Richard Smith2013-03-181-0/+11
| | | | | | 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
* PR13775: When checking for a tag type being shadowed by some other declaration,Richard Smith2012-09-061-0/+14
| | | | | | don't trample over the caller's LookupResult in the case where the check fails. llvm-svn: 163281
* Add diagnostics for comma at end of enum and for extra semicolon at namespaceRichard Smith2012-07-231-1/+5
| | | | | | | | scope to -Wc++11-extensions. Move extra semicolon after member function definition diagnostic out of -pedantic, since C++ allows a single semicolon there. Keep it in -Wextra-semi, though, since it's still questionable. llvm-svn: 160618
* Move the warnings for extra semi-colons under -Wextra-semi. Also, addedRichard Trieu2012-05-161-2/+2
| | | | | | | | a warning for an extra semi-colon after function definitions. Added logic so that a block of semi-colons on a line will only get one warning instead of a warning for each semi-colon. llvm-svn: 156934
* Don't try to parse a malformed parameter list after a constructor or operatorRichard Smith2012-03-291-5/+4
| | | | | | name as a direct initializer. llvm-svn: 153628
* When we see 'Class(X' or 'Class::Class(X' and we suspect that it names aRichard Smith2012-03-271-0/+24
| | | | | | | | | | | | | constructor, but X is not a known typename, check whether the tokens could possibly match the syntax of a declarator before concluding that it isn't a constructor. If it's definitely ill-formed, assume it is a constructor. Empirical evidence suggests that this pattern is much more often a constructor with a typoed (or not-yet-declared) type name than any of the other possibilities, so the extra cost of the check is not expected to be problematic. llvm-svn: 153488
* Fix code so that a SkipUntil will ignore semicolons when skipping aRichard Trieu2012-01-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function body. This keeps the brace count accurate to prevent additional errors. Also, moved the caret from the brace to the function name. Code: class F{ int Foo{ return 1; } }; Fixed error: parameters.cc:1:14: error: function definition does not declare parameters class F{ int Foo{ return 1; } }; ^ 1 error generated. Old errors: parameters.cc:1:17: error: function definition does not declare parameters class F{ int Foo{ return 1; } }; ^ parameters.cc:1:30: error: expected ';' after class class F{ int Foo{ return 1; } }; ^ ; parameters.cc:1:31: error: expected external declaration class F{ int Foo{ return 1; } }; ^ 3 errors generated. llvm-svn: 148621
* Fix crash-on-invalid, improve error recovery, and test coverage for missing ↵David Blaikie2011-10-131-0/+17
| | | | | | colon after access specifiers in C++ llvm-svn: 141852
* Parse the optional semicolon after a C++ in-class member functionDouglas Gregor2011-01-191-2/+6
| | | | | | | definition, rather than complaining about it. Problem reported by Marshall Clow. llvm-svn: 123835
* Complain when an unnamed enumeration has no enumerations (inDouglas Gregor2010-07-131-1/+1
| | | | | | C++). Fixes PR7466. llvm-svn: 108231
* Downgrade the "declaration does not declare anything" error to aDouglas Gregor2010-04-081-1/+1
| | | | | | | warning. It's not harmful to have such pointless declarations, and GCC does not diagnose this issue consistently. llvm-svn: 100814
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Semantic checking for class template declarations andDouglas Gregor2009-02-061-1/+1
| | | | | | | | | | | | | | | redeclarations. For example, checks that a class template redeclaration has the same template parameters as previous declarations. Detangled class-template checking from ActOnTag, whose logic was getting rather convoluted because it tried to handle C, C++, and C++ template semantics in one shot. Made some inroads toward eliminating extraneous "declaration does not declare anything" errors by adding an "error" type specifier. llvm-svn: 63973
* Implement support for anonymous structs and unions in C. Both C andDouglas Gregor2009-01-121-1/+1
| | | | | | | | | | | | | | C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. llvm-svn: 62112
* implement PR3177 - "__extension__ union" not supported in C++ modeChris Lattner2008-12-181-0/+9
| | | | llvm-svn: 61180
* Implement parsing and semantic checking of the 'mutable' keyword.Sebastian Redl2008-11-141-0/+1
| | | | | | Thanks to Doug for the review. Actual effects of mutable to follow. llvm-svn: 59331
* Update C++ status to reflect parser capabilities for chapter 9 (classes). ↵Sebastian Redl2008-11-081-1/+9
| | | | | | Slightly extend the class parser test. llvm-svn: 58909
* Handle unnamed bitfields when parsing C++ classes.Argyrios Kyrtzidis2008-06-281-0/+1
| | | | llvm-svn: 52855
* Add parsing support for C++ classes.Argyrios Kyrtzidis2008-06-241-0/+19
Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place. Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass. llvm-svn: 52694
OpenPOWER on IntegriCloud