summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/bracket-decl.c
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-02-18 15:30:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-02-18 15:30:24 +0000
commit72dae62b8ad99c2cde043f0a220c37d104c82950 (patch)
treee4f337570098fa646bc6444f68700082d5722fdc /clang/test/CodeCompletion/bracket-decl.c
parenta7bdd29c9c714846769c449770a4b215c88ec3e3 (diff)
downloadbcm5719-llvm-72dae62b8ad99c2cde043f0a220c37d104c82950.tar.gz
bcm5719-llvm-72dae62b8ad99c2cde043f0a220c37d104c82950.zip
[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. llvm-svn: 261217
Diffstat (limited to 'clang/test/CodeCompletion/bracket-decl.c')
-rw-r--r--clang/test/CodeCompletion/bracket-decl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeCompletion/bracket-decl.c b/clang/test/CodeCompletion/bracket-decl.c
new file mode 100644
index 00000000000..cf80b424d13
--- /dev/null
+++ b/clang/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
OpenPOWER on IntegriCloud