summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/default1.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Attempt typo correction for function calls with the wrong number of arguments.Kaelyn Uhrain2013-07-081-3/+8
| | | | | | | | | | | | | | | Combined with typo correction's new ability to apply global/absolute nested name specifiers to possible corrections, cases such as in PR12287 where the desired function is being shadowed by a lexically closer function with the same name but a different number of parameters will now include a FixIt. On a side note, since the test for this change caused test/SemaCXX/typo-correction.cpp to exceed the typo correction limit for a single file, I've included a test case for exceeding the limit and added some comments to both the original and part two of typo-correction.cpp warning future editors of the files about the limit. llvm-svn: 185881
* Further improvement to wording of overload resolution diagnostics, and includingRichard Smith2012-05-151-1/+8
| | | | | | 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-1/+1
| | | | | | | which expects exactly one argument, include the name of the argument in the diagnostic text. Patch by Terry Long! llvm-svn: 156607
* Ensure that default arguments are handled correctly in sub scopes. For example:James Molloy2012-03-131-0/+18
| | | | | | | | | | | | | void f () { int g (int a, int b=4); { int g(int a, int b=5); } } should compile. llvm-svn: 152621
* Whenever we complain about a failed initialization of a function orDouglas Gregor2010-04-221-3/+6
| | | | | | | | | | | | | | | | | method parameter, provide a note pointing at the parameter itself so the user does not have to manually look for the function/method being called and match up parameters to arguments. For example, we now get: t.c:4:5: warning: incompatible pointer types passing 'long *' to parameter of type 'int *' [-pedantic] f(long_ptr); ^~~~~~~~ t.c:1:13: note: passing argument to parameter 'x' here void f(int *x); ^ llvm-svn: 102038
* Switch default arguments over to InitializationSequence.Eli Friedman2009-12-221-1/+1
| | | | llvm-svn: 91883
* Switch more of Sema::CheckInitializerTypes over toDouglas Gregor2009-12-191-3/+3
| | | | | | | | | | InitializationSequence. Specially, switch initialization of a C++ class type (either copy- or direct-initialization). Also, make sure that we create an elidable copy-construction when performing copy initialization of a C++ class variable. Fixes PR5826. llvm-svn: 91750
* 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
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Correct the order in which we cope with end-of-class-definitionDouglas Gregor2008-12-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | semantics and improve our handling of default arguments. Specifically, we follow this order: - As soon as the see the '}' in the class definition, the class is complete and we add any implicit declarations (default constructor, copy constructor, etc.) to the class. - If there are any default function arguments, parse them - If there were any inline member function definitions, parse them As part of this change, we now keep track of the the fact that we've seen unparsed default function arguments within the AST. See the new ParmVarDecl::hasUnparsedDefaultArg member. This allows us to properly cope with calls inside default function arguments to other functions where we're making use of the default arguments. Made some C++ error messages regarding failed initializations more specific. llvm-svn: 61406
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-1/+1
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* Now that we have copy initialization support, use it for checking the ↵Douglas Gregor2008-11-041-0/+12
| | | | | | default arguments llvm-svn: 58692
* Move the rest of the Sema C++ tests into the SemaCXX test directory.Argyrios Kyrtzidis2008-08-221-0/+17
llvm-svn: 55178
OpenPOWER on IntegriCloud