summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/over/over.over
Commit message (Collapse)AuthorAgeFilesLines
* [Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2aSaar Raz2020-01-241-1/+1
| | | | | | | | | Now with concepts support merged and mostly complete, we do not need -fconcepts-ts (which was also misleading as we were not implementing the TS) and can enable concepts features under C++2a. A warning will be generated if users still attempt to use -fconcepts-ts. (cherry picked from commit 67c608a9695496cfc9d3fdf9d0b12b554ac6b4df)
* [Concepts] Function trailing requires clausesSaar Raz2020-01-091-0/+61
| | | | | | Function trailing requires clauses now parsed, supported in overload resolution and when calling, referencing and taking the address of functions or function templates. Differential Revision: https://reviews.llvm.org/D43357
* [c++1z] P0012R1: Implement a few remaining pieces: downgrade diagnostic forRichard Smith2016-10-221-3/+18
| | | | | | | | | | | | | | mismatched dynamic exception specifications in expressions from an error to a warning, since this is no longer ill-formed in C++1z. Allow reference binding of a reference-to-non-noexcept function to a noexcept function lvalue. As defect resolutions, also allow a conditional between noexcept and non-noexcept function lvalues to produce a non-noexcept function lvalue (rather than decaying to a function pointer), and allow function template argument deduction to deduce a reference to non-noexcept function when binding to a noexcept function type. llvm-svn: 284905
* P0012R1: Make exception specifications be part of the type system. ThisRichard Smith2016-10-161-3/+5
| | | | | | | implements the bulk of the change (modifying the type system to include exception specifications), but not all the details just yet. llvm-svn: 284337
* [Sema] Be consistent about diagnostic wording: always use "cannot".Davide Italiano2015-08-151-3/+3
| | | | | | Discussed with Richard Smith. llvm-svn: 245162
* Don't produce duplicate notes if we have deduction failure notes when resolvingRichard Smith2013-08-141-1/+1
| | | | | | the address of an overloaded function template. llvm-svn: 188334
* FIXME fix: improving diagnostics for template arguments deduction of class ↵Larisse Voufo2013-07-191-1/+2
| | | | | | | | templates and explicit specializations This patch essentially removes all the FIXMEs following calls to DeduceTemplateArguments() that want to keep track of deduction failure info. llvm-svn: 186730
* Revert "Use function overloading instead of template specialization for ↵Larisse Voufo2013-07-191-2/+1
| | | | | | | | diagnosis of bad template argument deductions." This reverts commit a730f548325756d050d4caaa28fcbffdae8dfe95. llvm-svn: 186729
* Use function overloading instead of template specialization for diagnosis of ↵Larisse Voufo2013-07-191-1/+2
| | | | | | bad template argument deductions. llvm-svn: 186727
* Bound member function diagnostic - suggest no-args calls and note overload ↵David Blaikie2013-06-041-1/+1
| | | | | | | | | | candidates Still missing cases for templates, but this is a step in the right direction. Also omits suggestions that would be ambiguous (eg: void func(int = 0); + void func(float = 0); func;) llvm-svn: 183173
* Unpluralize -Wfoo-conversions warnings for consistency.David Blaikie2012-03-151-1/+1
| | | | | | | | | | | | Err on the side of brevity and rename (while providing aliases for the original name) -Wbool-conversions, -Wint-conversions, and -Wvector-conversions for consistency with constant, literal, string, and sign conversion warnings. And name the diagnostic groups explicitly while I'm here rather than rewriting the string in the groups and sema td files. Curiously, vector-conversion is not under -Wconversion. Perhaps it should be. llvm-svn: 152776
* 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
* Add notes for suppressing and (if it's a zero-arg function returning bool) ↵David Blaikie2011-12-091-15/+15
| | | | | | fixing the function-to-bool conversion warning. llvm-svn: 146280
* Add a warning for implicit conversion from function literals (and staticLang Hames2011-12-051-14/+14
| | | | | | | | | | | | | methods) to bool. E.g. void foo() {} if (f) { ... // <- Warns here. } Only applies to non-weak functions, and does not apply if the function address is taken explicitly with the addr-of operator. llvm-svn: 145849
* Teach the ARC compiler to not require __bridge casts whenJohn McCall2011-10-171-2/+2
| | | | | | | passing/receiving CF objects at +0 to/from Objective-C methods or audited C functions. llvm-svn: 142219
* Catch placeholder types in DefaultLvalueConversionJohn McCall2011-10-111-15/+15
| | | | | | | | | | | and DefaultFunctionArrayLvalueConversion. To prevent significant regression for should-this-be-a-call fixits, and to repair some such regression from the introduction of bound member placeholders, make those placeholder checks try to build calls appropriately. Harden the build-a-call logic while we're at it. llvm-svn: 141738
* Make yet another placeholder type, this one marking that an expression is a ↵John McCall2011-04-261-11/+12
| | | | | | | | | | | bound member function, i.e. something of the form 'x.f' where 'f' is a non-static member function. Diagnose this in the general case. Some of the new diagnostics are probably worse than the old ones, but we now get this right much more universally, and there's certainly room for improvement in the diagnostics. llvm-svn: 130239
* Simplify calling CheckPlaceholderExpr, converge on it in a few places,John McCall2011-04-101-6/+6
| | | | | | and move a vector-splat check to follow l-value conversion. llvm-svn: 129254
* Fix a bug in how we were resolving the address of overloaded functionsChandler Carruth2011-03-291-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | when the resolution took place due to a single template specialization being named with an explicit template argument list. In this case, the "resolution" doesn't take into account the target type at all, and therefore can take place for functions, static member functions, and *non-static* member functions. The latter weren't being properly checked and their proper form enforced in this scenario. We now do so. The result of this last form slipping through was some confusing logic in IsStandardConversion handling of these resolved address-of expressions which eventually exploded in an assert. Simplify this logic a bit and add some more aggressive asserts to catch improperly formed expressions getting into this routine. Finally add systematic testing of member functions, both static and non-static, in the various forms they can take. One of these is essentially PR9563, and this commit fixes the crash in that PR. However, the diagnostics for this are still pretty terrible. We at least are now accepting the correct constructs and rejecting the invalid ones rather than accepting invalid or crashing as before. llvm-svn: 128456
* Produce a diagnostic for unused overloaded expressions, from Faisal Vali!Douglas Gregor2011-03-071-0/+31
| | | | llvm-svn: 127148
* Handle the resolution of a reference to a function template (whichDouglas Gregor2011-02-193-4/+97
| | | | | | | | includes explicitly-specified template arguments) to a function template specialization in cases where no deduction is performed or deduction fails. Patch by Faisal Vali, fixes PR7505! llvm-svn: 126048
* Properly diagnose invalid casts to function references. Patch byDouglas Gregor2010-11-082-4/+2
| | | | | | Faisal Vali, tweaked by me. Fixes PR8230. llvm-svn: 118400
* Initialization improvements: addition of string initialization and a fewEli Friedman2009-12-192-2/+2
| | | | | | | | small bug fixes in SemaInit, switch over SemaDecl to use it more often, and change a bunch of diagnostics which are different with the new initialization code. llvm-svn: 91767
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-153-3/+3
| | | | | | | | | - 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
* Update for LLVM API change.Owen Anderson2009-07-271-1/+1
| | | | llvm-svn: 77249
* Fix test case to match intent.Daniel Dunbar2009-07-111-1/+1
| | | | llvm-svn: 75381
* Another little test for C++ [over.over]Douglas Gregor2009-07-091-0/+10
| | | | llvm-svn: 75151
* Add test for C++ [over.over.]p1, the contexts in which one can take the ↵Douglas Gregor2009-07-091-0/+94
| | | | | | address of an overloaded function. llvm-svn: 75146
* Implement the simple form of overload resolution used when taking theDouglas Gregor2009-07-081-0/+23
address of an overloaded function (which may involve both functions and function templates). llvm-svn: 75069
OpenPOWER on IntegriCloud