summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/call.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert the fix for PR8013.Douglas Gregor2010-11-091-4/+2
| | | | | | | | | | | | | That bug concerned the well-formedness of code such as (&ovl)(a, b, c). GCC rejects the code, while EDG accepts it. On further study of the standard, I see no support for EDG's position: in particular, C++ [over.over] does not list this as a context where we can take the address of an overloaded function, C++ [over.call.func] does not reference the address-of operator at any point, and C++ [expr.call] claims that the function argument in a call is either a function lvalue or a pointer-to-function; (&ovl) is neither. llvm-svn: 118620
* Handle overload resolution when calling an overloaded function setDouglas Gregor2010-11-091-2/+4
| | | | | | with, e.g., (&f)(a, b, c). Fixes PR8013. llvm-svn: 118508
* Make -code-completion-patterns only cover multi-line codeDouglas Gregor2010-05-281-1/+1
| | | | | | | completions. Plus, tweak a few completion patterns to better reflect the language grammar. llvm-svn: 104905
* Only enable code patterns (e.g., try { statements } catch (...) {Douglas Gregor2010-05-251-1/+1
| | | | | | statements }) in the code-completion results if explicitly requested. llvm-svn: 104637
* When code completion produces an overload set as its results (e.g.,Douglas Gregor2010-04-061-0/+1
| | | | | | | while we're completing in the middle of a function call), also produce "ordinary" name results that show what can be typed at that point. llvm-svn: 100558
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-2/+2
| | | | | | | | | | 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-2/+2
| | | | | | | | | - 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
* Remove RUN: true lines.Daniel Dunbar2009-11-081-1/+0
| | | | llvm-svn: 86432
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-2/+2
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* When code-completion after a "," is building an overload set, noteDouglas Gregor2009-09-231-3/+3
| | | | | | | | that there is one more argument (the one following the comma) and make the candidate non-viable if the function cannot accept any argument in that position. llvm-svn: 82625
* Print the results of code-completion for overloading by displaying theDouglas Gregor2009-09-231-5/+5
| | | | | | | signature of the function with the current parameter highlighted as a placeholder. llvm-svn: 82593
* Separate the code-completion results for call completion from theDouglas Gregor2009-09-231-7/+6
| | | | | | | | results for other, textual completion. For call completion, we now produce enough information to show the function call argument that we are currently on. llvm-svn: 82592
* Replace the -code-completion-dump option with Douglas Gregor2009-09-221-5/+12
| | | | | | | | | | | -code-completion-at=filename:line:column which performs code completion at the specified location by truncating the file at that position and enabling code completion. This approach makes it possible to run multiple tests from a single test file, and gives a more natural command-line interface. llvm-svn: 82571
* Implement code completion within a function call, triggered after theDouglas Gregor2009-09-221-0/+22
opening parentheses and after each comma. We gather the set of visible overloaded functions, perform "partial" overloading based on the set of arguments that we have thus far, and return the still-viable results sorted by the likelihood that they will be the best candidate. Most of the changes in this patch are a refactoring of the overloading routines for a function call, since we needed to separate out the notion of building an overload set (common to code-completion and normal semantic analysis) and then what to do with that overload set. As part of this change, I've pushed explicit template arguments into a few more subroutines. There is still much more work to do in this area. Function templates won't be handled well (unless we happen to deduce all of the template arguments before we hit the completion point), nor will overloaded function-call operators or calls to member functions. llvm-svn: 82549
OpenPOWER on IntegriCloud