summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/get-cursor.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-11-13 09:50:19 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-11-13 09:50:19 +0000
commitcde7069ce48cf2dbf53307d5ed270a4cdddf2081 (patch)
treebbf786ae698c4e44838e682e245406f7928e0b26 /clang/test/Index/get-cursor.cpp
parent94751be7fa2c2bf657d397c4f85d42e0a3397fb2 (diff)
downloadbcm5719-llvm-cde7069ce48cf2dbf53307d5ed270a4cdddf2081.tar.gz
bcm5719-llvm-cde7069ce48cf2dbf53307d5ed270a4cdddf2081.zip
[libclang] Make sure to visit the body of a CXXForRangeStmt.
llvm-svn: 221881
Diffstat (limited to 'clang/test/Index/get-cursor.cpp')
-rw-r--r--clang/test/Index/get-cursor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/Index/get-cursor.cpp b/clang/test/Index/get-cursor.cpp
index bdee1653d06..60aab5f7ed7 100644
--- a/clang/test/Index/get-cursor.cpp
+++ b/clang/test/Index/get-cursor.cpp
@@ -138,7 +138,9 @@ struct TestColl {
};
void test(TestColl coll) {
- for (auto lv : coll) {}
+ for (auto lv : coll) {
+ (void)lv;
+ }
}
// RUN: c-index-test -cursor-at=%s:6:4 %s | FileCheck -check-prefix=CHECK-COMPLETION-1 %s
@@ -253,6 +255,7 @@ void test(TestColl coll) {
// CHECK-SPELLING: 130:6 CXXMethod=operator():130:6 (const) Extent=[130:3 - 130:37] Spelling=operator() ([130:6 - 130:16])
// CHECK-SPELLING: 132:12 CXXConversion=operator bool:132:12 (const) Extent=[132:3 - 132:33] Spelling=operator bool ([132:12 - 132:25])
-// RUN: c-index-test -cursor-at=%s:141:13 -cursor-at=%s:141:18 -std=c++11 %s | FileCheck -check-prefix=CHECK-FORRANGE %s
+// RUN: c-index-test -cursor-at=%s:141:13 -cursor-at=%s:141:18 -cursor-at=%s:142:11 -std=c++11 %s | FileCheck -check-prefix=CHECK-FORRANGE %s
// CHECK-FORRANGE: 141:13 VarDecl=lv:141:13 (Definition) Extent=[141:8 - 141:17] Spelling=lv ([141:13 - 141:15])
// CHECK-FORRANGE: 141:18 DeclRefExpr=coll:140:20 Extent=[141:18 - 141:22] Spelling=coll ([141:18 - 141:22])
+// CHECK-FORRANGE: 142:11 DeclRefExpr=lv:141:13 Extent=[142:11 - 142:13] Spelling=lv ([142:11 - 142:13])
OpenPOWER on IntegriCloud