summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/index-local-symbol.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2018-10-04 11:03:55 +0000
committerHaojian Wu <hokein@google.com>2018-10-04 11:03:55 +0000
commite94c8694344369d16814b19e4828a6b42e4ea2c0 (patch)
tree156e2c4846d0ed04763819f9647fbb0009825943 /clang/test/Index/index-local-symbol.cpp
parentaacd5e187b9111d2ee206f4e7b942e7243b6dbc4 (diff)
downloadbcm5719-llvm-e94c8694344369d16814b19e4828a6b42e4ea2c0.tar.gz
bcm5719-llvm-e94c8694344369d16814b19e4828a6b42e4ea2c0.zip
[Index] Respect "IndexFunctionLocals" option for type loc.
Summary: Previously, clang index ignored local symbols defined in the function body even IndexFunctionLocals is true. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, ioeric, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52877 llvm-svn: 343767
Diffstat (limited to 'clang/test/Index/index-local-symbol.cpp')
-rw-r--r--clang/test/Index/index-local-symbol.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Index/index-local-symbol.cpp b/clang/test/Index/index-local-symbol.cpp
new file mode 100644
index 00000000000..1ffc4ec89ed
--- /dev/null
+++ b/clang/test/Index/index-local-symbol.cpp
@@ -0,0 +1,6 @@
+void ff() {
+ struct Foo {};
+}
+
+// RUN: env CINDEXTEST_INDEXLOCALSYMBOLS=1 c-index-test -index-file %s | FileCheck %s
+// CHECK: [indexDeclaration]: kind: struct | name: Foo | {{.*}} | loc: 2:10 \ No newline at end of file
OpenPOWER on IntegriCloud