diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-02-18 15:30:24 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-02-18 15:30:24 +0000 |
commit | 059e6e9ac25d4f748f86ef0ef7a6c26a35551f11 (patch) | |
tree | e3ed359f2840bb3008332ea7c5dd2e2e09a5f548 /test/CodeCompletion | |
parent | 9ac438062906eff96a8f2cf1dd61dd630645717a (diff) |
[Parse] Code complete expressions in bracket declarators.
Currently we return no results when completing inside of the brackets in
a 'char foo[]' declaration. Let the generic expression completion code
handle it instead. We could get fancier here (e.g. filter non-constant
expressions in contexts where VLAs are not allowed), but it's a strict
improvement over the existing version.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeCompletion')
-rw-r--r-- | test/CodeCompletion/bracket-decl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeCompletion/bracket-decl.c b/test/CodeCompletion/bracket-decl.c new file mode 100644 index 0000000000..cf80b424d1 --- /dev/null +++ b/test/CodeCompletion/bracket-decl.c @@ -0,0 +1,9 @@ +#define PATHSIZE 256 + +static const int len = 1234; + +void foo() { + char arr[ +// RUN: %clang_cc1 -fsyntax-only -code-completion-macros -code-completion-at=%s:6:12 %s -o - | FileCheck %s +// CHECK: COMPLETION: len +// CHECK: COMPLETION: PATHSIZE |