summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/class/class.mem
Commit message (Collapse)AuthorAgeFilesLines
* When typo-correcting a function name, consider correcting to a type nameRichard Smith2019-05-091-2/+2
| | | | | | for a function-style cast. llvm-svn: 360302
* Related to PR37768: improve diagnostics for class name shadowing.Richard Smith2018-06-202-3/+49
| | | | | | | | | | | | Diagnose the name of the class being shadowed by using declarations, and improve the diagnostics for the case where the name of the class is shadowed by a non-static data member in a class with constructors. In the latter case, we now always give the "member with the same name as its class" diagnostic regardless of the relative order of the member and the constructor, rather than giving an inscrutible diagnostic if the constructor appears second. llvm-svn: 335182
* Fix half of PR26048. We don't yet diagnose the case where the anonymous ↵Richard Smith2016-01-061-2/+2
| | | | | | union member is declared first and the tag name is declared second. llvm-svn: 256979
* DR1909: Diagnose all invalid cases of a class member sharing its name with ↵Richard Smith2015-07-061-6/+35
| | | | | | the class. llvm-svn: 241425
* When we see something that looks like a constructor with a return type, only ↵Richard Smith2015-07-061-5/+2
| | | | | | issue one error, not two. llvm-svn: 241424
* PR21437, final part of DR1330: delay-parsing of exception-specifications. ThisRichard Smith2014-11-131-0/+30
| | | | | | | is a re-commit of Doug's r154844 (modernized and updated to fit into current Clang). llvm-svn: 221918
* Don't use the implicit int rule for error recovery in C++. Instead, try toRichard Smith2012-05-151-2/+3
| | | | | | disambiguate whether the type name was forgotten or mistyped. llvm-svn: 156854
* Disable our non-standard delayed parsing of exception specifications. DelayingRichard Smith2012-05-021-30/+0
| | | | | | | the parsing of such things appears to be a conforming extension, but it breaks libstdc++4.7's std::pair. llvm-svn: 155975
* PR12688: ParseCXXClassMemberDeclaration's sometimes-null ThisDecl takes anotherRichard Smith2012-04-291-0/+13
| | | | | | | victim. Don't crash if we have a delay-parsed exception specification for a class member which is invalid in a way which precludes building a FunctionDecl. llvm-svn: 155788
* Don't try to delay parsing the exception specification for a data member of aRichard Smith2012-04-241-1/+9
| | | | | | class; we would never actually parse it and attach it to the type. llvm-svn: 155426
* PR12629: Cope with parenthesized function types when attaching a delayedRichard Smith2012-04-241-1/+10
| | | | | | exception specification to a function. llvm-svn: 155424
* Implement the last part of C++ [class.mem]p2, delaying the parsing ofDouglas Gregor2012-04-161-0/+27
| | | | | | | | | exception specifications on member functions until after the closing '}' for the containing class. This allows, for example, a member function to throw an instance of its own class. Fixes PR12564 and a fairly embarassing oversight in our C++98/03 support. llvm-svn: 154844
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) llvm-svn: 146619
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-132-2/+2
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Implement support for C++11 in-class initialization of non-static data members.Richard Smith2011-06-111-0/+9
| | | | llvm-svn: 132878
* Fix a typo in a test.Richard Trieu2011-05-041-1/+1
| | | | | | CHEKC -> CHECK llvm-svn: 130809
* Diagnose attempts to implicitly instantiate a template before it isJohn McCall2011-04-271-0/+31
| | | | | | fully defined. Somehow this escaped notice for a very long time. llvm-svn: 130298
* Remove warnings about using override control keywords in inline function ↵Anders Carlsson2011-03-251-13/+0
| | | | | | definitions; they will be allowed in the next C++0x draft. llvm-svn: 128273
* Remove 'new' from virt-specifier since it's going to be removed in the next ↵Anders Carlsson2011-03-252-3/+0
| | | | | | C++0x draft llvm-svn: 128271
* PR9037: Allow override, final, and new as an extension on inline members.Nico Weber2011-01-282-0/+42
| | | | llvm-svn: 124477
* Fix tests to be valid.Anders Carlsson2011-01-201-2/+11
| | | | llvm-svn: 123887
* Change the parser error to reflect that virt-specifiers are allowed on any ↵Anders Carlsson2011-01-201-3/+3
| | | | | | class member. llvm-svn: 123883
* Only allow virtual member functions to be marked 'override' and 'final'.Anders Carlsson2011-01-201-0/+12
| | | | llvm-svn: 123882
* Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.Anders Carlsson2011-01-171-0/+6
| | | | | | | Enforce C++[class.mem]p8: A virt-specifier-seq shall contain at most one of each virt-specifier. llvm-svn: 123611
* Diagnose C++ [class.mem]p13-14, where a class member has the same nameDouglas Gregor2010-10-152-0/+59
| | | | | | as the class itself. Fixes PR7082. llvm-svn: 116573
* If we end up instantiating a function parameter whose default argumentDouglas Gregor2010-10-121-0/+27
| | | | | | | | | has not yet been parsed, note that the default argument hasn't been parsed and keep track of all of the instantiations of that function parameter. When its default argument does get parsed, imbue the instantiations with that default argument. Fixes PR8245. llvm-svn: 116324
* Parse default arguments within member functions in source order, fromDouglas Gregor2010-10-121-0/+46
| | | | | | Manuel Klimek! Fixes PR7715. llvm-svn: 116311
* Add redeclaration checking for static data members and fix a cornerDouglas Gregor2010-08-301-0/+64
case with redeclaration checking for fields, from Faisal Vali! Fixes PR7970. llvm-svn: 112476
OpenPOWER on IntegriCloud