summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/addr-of-overloaded-function.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make the diagnostic message more consistant. Update the type comparison toRichard Trieu2011-12-131-1/+1
| | | | | | | handle non-pointer types. This is for the extra info printed when function types are compared. llvm-svn: 146525
* Add feature to diagnostics that will provide more information on functionRichard Trieu2011-11-231-0/+61
| | | | | | | | | | pointer mismatch. Cases covered are: initialization, assignment, and function arguments. Additional text will give the extra information about the nature of the mismatch: different classes for member functions, wrong number of parameters, different parameter type, different return type, and function qualifier mismatch. llvm-svn: 145114
* Teach the ARC compiler to not require __bridge casts whenJohn McCall2011-10-171-2/+1
| | | | | | | passing/receiving CF objects at +0 to/from Objective-C methods or audited C functions. llvm-svn: 142219
* Make yet another placeholder type, this one marking that an expression is a ↵John McCall2011-04-261-3/+4
| | | | | | | | | | | 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
* Handle the resolution of a reference to a function template (whichDouglas Gregor2011-02-191-3/+3
| | | | | | | | 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
* When attempting reference binding to an overloaded function, alsoDouglas Gregor2010-11-081-0/+29
| | | | | | | consider that we might be trying to bind a reference to a class type, which involves a constructor call. Fixes PR7425. llvm-svn: 118407
* Properly diagnose invalid casts to function references. Patch byDouglas Gregor2010-11-081-6/+6
| | | | | | Faisal Vali, tweaked by me. Fixes PR8230. llvm-svn: 118400
* When performing template argument deduction of a function templateDouglas Gregor2010-09-291-0/+12
| | | | | | | | against a function type, be sure to check the type of the resulting function template specialization against the desired function type after substituting the deduced/defaulted template arguments. Fixes PR8196. llvm-svn: 115086
* Don't assert when attempting to take the address of an overloadedDouglas Gregor2010-09-121-0/+8
| | | | | | | function fails due to ambiguities in partial ordering of function templates. Fixes PR8033. llvm-svn: 113725
* PR7971: Compute the correct type for an address-of expression containing anEli Friedman2010-08-241-0/+10
| | | | | | UnresolvedMemberExpr. llvm-svn: 111899
* Use the naming class from the overloaded lookup when access-checking anJohn McCall2010-04-221-0/+16
| | | | | | | | | | address of overloaded function, instead of assuming that a nested name specifier was used. A nested name specifier is not required for static functions. Fixes PR6886. llvm-svn: 102107
* Always diagnose and complain about problems inDouglas Gregor2010-04-141-0/+16
| | | | | | | | | | ResolveAddressOfOverloadedFunction when asked to complain. Previously, we had some weird handshake where ResolveAddressOfOverloadedFunction expected its caller to handle some of the diagnostics but not others, and yet there was no way for the caller to know which case we were in. Eliminate this madness, fixing <rdar://problem/7765884>. llvm-svn: 101312
* Switch file-scope assignment initialization over to InitializationSequence.Eli Friedman2009-12-221-1/+1
| | | | llvm-svn: 91881
* 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
* Handle MemberExprs in ResolveAddressOfOverloadedFunction.Anders Carlsson2009-10-071-0/+10
| | | | llvm-svn: 83495
* Slightly improve the test for partial ordering of overloaded functionDouglas Gregor2009-09-141-3/+5
| | | | | | templates. llvm-svn: 81806
* Test function template partial ordering when resolving the address ofDouglas Gregor2009-09-141-0/+15
| | | | | | an overloaded function (template). llvm-svn: 81804
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Basic support for taking the address of an overloaded functionDouglas Gregor2008-11-101-0/+29
llvm-svn: 59000
OpenPOWER on IntegriCloud