summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/incomplete-call.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Don't crash when recovering from a misspelled pseudo destructor call ↵Bruno Ricci2019-01-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | to an incomplete type. When attempting to correct a misspelled pseudo destructor call as in: struct Foo; void foo(Foo *p) { p.~Foo(); } a call is made in canRecoverDotPseudoDestructorCallsOnPointerObjects to LookupDestructor without checking that the record has a definition. This causes an assertion later in LookupSpecialMember which assumes that the record has a definition. Patch By Roman Zhikharevich! Differential Revision: https://reviews.llvm.org/D57111 Reviewed By: riccibruno llvm-svn: 352047
* Do not parse members of incomplete class.Serge Pavlov2015-06-101-0/+12
| | | | | | | | | | If definition of a class is unknown and out-of-line definition of its member is encountered, do not parse the member declaration. This change fixes PR18542. Differential Revision: http://reviews.llvm.org/D8010 llvm-svn: 239483
* 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
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-15/+15
| | | | | | | | | | therefore not creating ElaboratedTypes, which are still pretty-printed with the written tag). Most of these testcase changes were done by script, so don't feel too sorry for my fingers. llvm-svn: 98149
* 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
* Improve diagnostics and template instantiation behavior when callingDouglas Gregor2009-10-211-0/+7
| | | | | | an overloaded function call operator. llvm-svn: 84745
* Check the return type when calling pointer to member functions.Anders Carlsson2009-10-151-1/+5
| | | | llvm-svn: 84161
* Check the return type of binary operators and the arrow operator.Anders Carlsson2009-10-131-1/+5
| | | | llvm-svn: 84043
* Check the return type of operator[]() and fix a thinko that lead to a crash ↵Anders Carlsson2009-10-131-1/+3
| | | | | | in SemaCXX/overloaded-operator.cpp. llvm-svn: 84041
* More return type checking.Anders Carlsson2009-10-131-2/+5
| | | | llvm-svn: 84034
* Diagnose invalid return types for unary operators.Anders Carlsson2009-10-131-1/+5
| | | | llvm-svn: 84030
* Pass the right SourceLocation to ↵Anders Carlsson2009-10-131-1/+6
| | | | | | Actions.ActOnOverloadedOperatorReferenceExpr and Actions.ActOnConversionOperatorReferenceExpr. Update incomplete-call.cpp test. llvm-svn: 84026
* Check that the return type is complete when calling a member function.Anders Carlsson2009-10-101-1/+5
| | | | llvm-svn: 83694
* Add another test.Anders Carlsson2009-10-091-0/+16
llvm-svn: 83693
OpenPOWER on IntegriCloud