summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/overload-member-call.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix argument numbering confusion when diagnosing a non-viable operator().Richard Smith2019-10-291-0/+7
| | | | | This could lead to crashes if operator() is a variadic template, as we could end up asking for an out-of-bounds argument.
* When diagnosing an ambiguity, only note the candidates that contributeRichard Smith2019-10-241-1/+1
| | | | to the ambiguity, rather than noting all viable candidates.
* [Sema] Use %sub to cleanup overload diagnosticsEric Fiselier2018-05-301-1/+2
| | | | | | | | | | | | | | | | | | | | Summary: This patch adds the newly added `%sub` diagnostic modifier to cleanup repetition in the overload candidate diagnostics. I think this should be good to go. @rsmith: Some of the notes now emit `function template` where they only said `function` previously. It seems OK to me, but I would like your sign off on it. Reviewers: rsmith, EricWF Reviewed By: EricWF Subscribers: cfe-commits, rsmith Differential Revision: https://reviews.llvm.org/D47101 llvm-svn: 333485
* Implement C++ DR1391 (wg21.link/cwg1391)Richard Smith2017-01-091-1/+1
| | | | | | | | | | | | | | Check for implicit conversion sequences for non-dependent function template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation. This re-commits r290808, reverted in r290811 and r291412, with a couple of fixes for handling of explicitly-specified non-trailing template argument packs. llvm-svn: 291427
* Revert r291410 and r291411.Richard Smith2017-01-091-1/+1
| | | | | | The test-suite bots are still failing even after r291410's fix. llvm-svn: 291412
* Implement C++ DR1391 (wg21.link/cwg1391)Richard Smith2017-01-091-1/+1
| | | | | | | | | | | | | Check for implicit conversion sequences for non-dependent function template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation. This re-commits r290808, reverted in r290811, with a fix for handling of explicitly-specified template argument packs. llvm-svn: 291410
* Revert "DR1391: Check for implicit conversion sequences for non-dependent ↵Renato Golin2017-01-021-1/+1
| | | | | | | | | | | | | | function template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation." This reverts commit r290808, as it broken all ARM and AArch64 test-suite test: MultiSource/UnitTests/C++11/frame_layout Also, please, next time, try to write a commit message in according to our guidelines: http://llvm.org/docs/DeveloperPolicy.html#commit-messages llvm-svn: 290811
* DR1391: Check for implicit conversion sequences for non-dependent functionRichard Smith2017-01-021-1/+1
| | | | | | | | | | | | template parameters between deduction and substitution. The idea is to accept as many cases as possible, on the basis that substitution failure outside the immediate context is much more common during substitution than during implicit conversion sequence formation. This does not implement the partial ordering portion of DR1391, which so far appears to be misguided. llvm-svn: 290808
* Fix mismatch between pointer and pointee type when diagnosing an incorrectRichard Smith2013-01-261-0/+8
| | | | | | object argument type for a member call. llvm-svn: 173554
* Further improvement to wording of overload resolution diagnostics, and includingRichard Smith2012-05-151-4/+4
| | | | | | the sole parameter name in the diagnostic in more cases. Patch by Terry Long! llvm-svn: 156807
* PR11857: When the wrong number of arguments are provided for a functionRichard Smith2012-05-111-2/+11
| | | | | | | which expects exactly one argument, include the name of the argument in the diagnostic text. Patch by Terry Long! llvm-svn: 156607
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 'const std::type_info*' instead of 'std::type_info const*'Chris Lattner2010-09-051-4/+4
| | | | llvm-svn: 113092
* make clang print types as "const int *" instead of "int const*",Chris Lattner2010-09-051-2/+2
| | | | | | | which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. llvm-svn: 113090
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-4/+4
| | | | | | | | | | 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
* Rework base and member initialization in constructors, with severalDouglas Gregor2010-01-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (necessarily simultaneous) changes: - CXXBaseOrMemberInitializer now contains only a single initializer rather than a set of initialiation arguments + a constructor. The single initializer covers all aspects of initialization, including constructor calls as necessary but also cleanup of temporaries created by the initializer (which we never handled before!). - Rework + simplify code generation for CXXBaseOrMemberInitializers, since we can now just emit the initializer as an initializer. - Switched base and member initialization over to the new initialization code (InitializationSequence), so that it - Improved diagnostics for the new initialization code when initializing bases and members, to match the diagnostics produced by the previous (special-purpose) code. - Simplify the representation of type-checked constructor initializers in templates; instead of keeping the fully-type-checked AST, which is rather hard to undo at template instantiation time, throw away the type-checked AST and store the raw expressions in the AST. This simplifies instantiation, but loses a little but of information in the AST. - When type-checking implicit base or member initializers within a dependent context, don't add the generated initializers into the AST, because they'll look like they were explicit. - Record in CXXConstructExpr when the constructor call is to initialize a base class, so that CodeGen does not have to infer it from context. This ensures that we call the right kind of constructor. There are also a few "opportunity" fixes here that were needed to not regress, for example: - Diagnose default-initialization of a const-qualified class that does not have a user-declared default constructor. We had this diagnostic specifically for bases and members, but missed it for variables. That's fixed now. - When defining the implicit constructors, destructor, and copy-assignment operator, set the CurContext to that constructor when we're defining the body. llvm-svn: 94952
* Improve overload diagnostics some more by calling out qualifier mismatchesJohn McCall2010-01-141-2/+7
| | | | | | | for special diagnostics. Unfortunately, the non-overload diagnostics are not this good. llvm-svn: 93420
* Improve the diagnostic for bad conversions in overload resolution to talkJohn McCall2010-01-141-2/+8
| | | | | | about 'object argument' vs. 'nth argument'. llvm-svn: 93395
* Record some basic information about bad conversion sequences. Use thatJohn McCall2010-01-131-0/+19
| | | | | | | information to feed diagnostics instead of regenerating it. Much room for improvement here, but fixes some unfortunate problems reporting on method calls. llvm-svn: 93316
* 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
* Make sure to grab CVR qualifiers from the canonical type. ARGH!Douglas Gregor2009-11-051-0/+12
| | | | llvm-svn: 86079
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Make one expected-diag directive match exactly one actual diagnostic.Sebastian Redl2009-02-071-5/+5
| | | | | | This uncovers some bugs, so several test cases now fail. llvm-svn: 64025
* Update C++ status and add a few more tests of overloading for member ↵Douglas Gregor2009-01-121-0/+17
| | | | | | function calls llvm-svn: 62121
* Add support for calls to overloaded member functions. Things to note:Douglas Gregor2008-12-221-0/+39
- Overloading has to cope with having both static and non-static member functions in the overload set. - The call may or may not have an implicit object argument, depending on the syntax (x.f() vs. f()) and the context (static vs. non-static member function). - We now generate MemberExprs for implicit member access expression. - We now cope with mutable whenever we're building MemberExprs. llvm-svn: 61329
OpenPOWER on IntegriCloud