8ca7208d0fb4dcbc5fa8cfeca6a1081ce69da8e0 |
|
18-Oct-2011 |
Douglas Gregor <dgregor@apple.com> |
Provide result types for code completions that describe built-in expressions (this, sizeof, etc.). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
8ec904c151abf7ed0dc911258574a904ed97ff15 |
|
19-Oct-2010 |
Douglas Gregor <dgregor@apple.com> |
Tweak code-completion result priorities, so that exact and similar type matches have a bigger impact. The impetus for this change was that, when initializing an enumeration value, we want enumerators of that enumeration type to have a higher priority than, e.g., unrelated local variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
6f942b2cabf32b96f9901b889d8e44a34e0e7c62 |
|
21-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Add code completion for C++ constructors wherever we see the class (or class template) and are in a context where we can have a value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
08f43cd5d966fd31b32bd5c76c0645ebbf08b2f1 |
|
21-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Code completion has no reason to prefer values over types, especially at the statement level or in Objective-C message receivers. Therefore, just give types and declarations the same basic priority, and adjust from there. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
d475aad02da03c31c0e07f7ce0e26ef22bc039da |
|
20-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Get rid of the lame attempt to prioritize "void" functions at statement context; it really isn't helpful in practice (remember printf!) and we'll be doing other adjustments for statements very soon. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
d754d5546ef1faa4216298fd95bc6a7f15808fd2 |
|
16-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Swap the priorities of constants and types, so that we prefer types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
0268810a46780144a2d5fb5a017c938d1199189c |
|
15-Sep-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a new code-completion context for a parenthesized expression, e.g., after the '(' that could also be a type cast. Here, we provide types as code-completion results in C/Objective-C (C++ already had them), although we wouldn't in a normal expression context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
58f9e13e87e57236fee4b914eea9be6f92a1c345 |
|
05-Sep-2010 |
Chris Lattner <sabre@nondot.org> |
make clang print types as "const int *" instead of "int const*", which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
e17794ffbb8d509d705207ce7140e290665ca33d |
|
31-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When provide code completions for a variadic Objective-C method declaration send or a variadic function call, collapse the ", ..." into the parameter before it, so that we don't get a second placeholder. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
721f359a350059a81945baa08f63b2e5feceb044 |
|
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When combining the code-completion results from Sema long with the code-completion results cached by ASTUnit, sort the resulting result set. This makes testing far, far easier, so this commit also includes tests for the previous few fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
55817afdf9d453a443262a733f6caf6692dca118 |
|
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce a preprocessor code-completion hook for contexts where we expect "natural" language and should not provide any completions, e.g., comments, string literals, #error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
eb0d0145910f3024d9bdefe279a1e9b95495f2fd |
|
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Give a slight preference to functions returning "void" when we're performing code completion at the statement level (rather than in an arbitrary expression). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
d43dd83a973c585c39a9a5e5e904282bc2371986 |
|
25-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
In code-completion contexts where both types and other values are present, prefer values to types, since it's more common to compute with values than it is to declare new entities or perform type casts. So, tweak the ranking of types vs. other declarations and constants accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
aaa107acc8f906203101af259e8d764b5027700a |
|
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When calling a function or messaging a method marked "sentinel", add the ", nil", ", NULL", or ", (void*)0" to the end of the code completion, since it always has to be there anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
58ddb60f409125eda5436c4a1f070f7fa4744295 |
|
24-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce new libclang API functions that determine the availability of a cursor or code-completion result, e.g., whether that result refers to an unavailable, deleted, or deprecated declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
aa5f77b2c914b68e6a3737c93db3598907bc64ab |
|
23-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Include __FUNCTION__, __PRETTY_FUNCTION_, __func__ in code-completion results for expression contexts within a function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
f5586f6b311c98e1022a8fe0609053849b70d323 |
|
16-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When caching code completions for global declarations, keep track of the usage type of each declaration result, then compare those types to the preferred type of the completion. This provides parity in the priority calculation between the code-completion results produced directly from Sema and those cached by ASTUnit. For the standard Cocoa.h (+ others) example, there's a penalty of 3-4 hundredeths of a second when caching the global results (for ~31,000 results), because we need an ASTContext-agnostic representation of types for the comparison, and therefore we use... strings. Eventually, we'd like to implement a more efficient ASTContext-agnostic encoding of types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
1827e10051638770ad9ccf3e285caf95f995afd1 |
|
16-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
When caching global completion results, keep track of the simplified type class, so that we can adjust priorities appropriately when the preferred type for the context and the actual type of the completion are similar. This gets us one step closer to parity of the cached completion results with the non-cached completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
8071e4212ae08f8014e0c3ae6d18b7388003a5cc |
|
15-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Extend the code-completion caching infrastructure to include global declarations (in addition to macros). Each kind of declaration maps to a certain set of completion contexts, and the ASTUnit completion logic introduces the completion strings for those declarations if the actual code-completion occurs in one of the contexts where it matters. There are a few new code-completion-context kinds. Without these, certain completions (e.g., after "using namespace") would need to suppress all global completions, which would be unfortunate. Note that we don't get the priorities right for global completions, because we don't have enough type information. We'll need a way to compare types in an ASTContext-agnostic way before this can be implemented. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
1abc6bca3d7fb0e7b1e40fbcad6cfb5e10594548 |
|
04-Aug-2010 |
Douglas Gregor <dgregor@apple.com> |
Add code-completion support directly to ASTUnit, which performs code completion within the translation unit using the same command-line arguments for parsing the translation unit. Eventually, we'll reuse the precompiled preamble to improve code-completion performance, and this also gives us a place to cache results. Expose this function via the new libclang function clang_codeCompleteAt(), which performs the code completion within a CXTranslationUnit. The completion occurs in-process (clang_codeCompletion() runs code completion out-of-process). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
33611e0d5ab1372608a7649b1877cd4300621c71 |
|
31-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve our handling of NULL after an escaping '\' in a string literal. Fixes <rdar://problem/8044135>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
bd6c76fd53e3674d5bbfefe471e2ae657ce69d0c |
|
31-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Improve parser recovery when we try to parse a call expression but the called function itself is invalid (e.g., because of a semantic error referring to that declaration). Fixes <rdar://problem/8044142>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
5ac3bdb2cb0113b640c54f01468d21985c08b252 |
|
30-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Teach code completion to adjust its completion priorities based on the type that we expect to see at a given point in the grammar, e.g., when initializing a variable, returning a result, or calling a function. We don't prune the candidate set at all, just adjust priorities to favor things that should type-check, using an ultra-simplified type system. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
4710e5b12b58dda87d82c5875f13ab9c8979cd8c |
|
28-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Do not produce types as valid code completions when we're in an expression context in C/Objective-C, or when we're in an @interface/@implementation/@protocol in Objective-C(++). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
12e131385e892e3723483a1081a89bcad29c8a84 |
|
27-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Introduce priorities into the code-completion results. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
d8e8a58ee35ab334ab9d0c2154dca029c1822e8a |
|
25-May-2010 |
Douglas Gregor <dgregor@apple.com> |
Only enable code patterns (e.g., try { statements } catch (...) { statements }) in the code-completion results if explicitly requested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|
64538cfd343c200d4285d0e5991ec94d9ff8876c |
|
06-Apr-2010 |
Douglas Gregor <dgregor@apple.com> |
Perform code-completion within ParseCastExpression, which handles, e.g., the right-hand side of binary expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Index/complete-exprs.c
|