Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 32be4a588f Switch c-index-test from clang_codeComplete() over to
clang_codeCompleteAt(). This uncovered a few issues with the latter:

  - ASTUnit wasn't saving/restoring diagnostic state appropriately between
    reparses and code completions.
  - "Overload" completions weren't being passed through to the client



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116241 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 21:37:58 +00:00
Douglas Gregor 4710e5b12b 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
2010-05-28 00:49:12 +00:00
Douglas Gregor c8bddde821 Make -code-completion-patterns only cover multi-line code
completions. Plus, tweak a few completion patterns to better reflect
the language grammar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104905 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-28 00:22:41 +00:00
Douglas Gregor d8e8a58ee3 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
2010-05-25 21:41:55 +00:00
Douglas Gregor fe0bdba446 Do not produce semicolons at the end of code-completion results
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100557 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-06 20:11:37 +00:00
Douglas Gregor ab0b4f1d66 Improve the sorting of code-completion results. We now always sort by
the "typed" text, first, then take into account
nested-name-specifiers, name hiding, etc. This means that the
resulting sort is actually alphabetical :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93370 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 23:24:38 +00:00
Douglas Gregor c38c3e1e72 Code-completion for @public, @protected, @private, @package.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93361 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 21:54:15 +00:00
Douglas Gregor b6ac2451bf Whenever completing ordinary names for an Objective-C source, also
provide completions for @ keywords. Previously, we only provided
@-completions after an @ was actually typed, which is useful but
probably not the common case.

Also, make sure a few Objective-C 2.0 completions only show up when
Objective-C 2.0 support is enabled (the default).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 21:24:21 +00:00
Benjamin Kramer 148299f5eb Fix tests for r93231.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93238 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 11:52:20 +00:00
Douglas Gregor 834389b874 Use horizontal-space markers in code-completion results rather than
embedding single space characters. <rdar://problem/7485503>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93231 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 06:38:28 +00:00
Douglas Gregor c464ae8444 Code completion for Objective-C @ directives
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90756 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-07 09:27:33 +00:00