summaryrefslogtreecommitdiffstats
path: root/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
commitda5bcf310ea7bff05a15b8650034774016bea7a3 (patch)
treef11e2c2dc6ed1b59bfded90d0f9e7337cb561285 /test/Index/get-cursor.cpp
parent1dde64b6e34fcaed8e9fbf0925a6cc3ecba67c7e (diff)
[libclang] Make sure to visit the body of a CXXForRangeStmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221881 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/get-cursor.cpp')
-rw-r--r--test/Index/get-cursor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/Index/get-cursor.cpp b/test/Index/get-cursor.cpp
index bdee1653d0..60aab5f7ed 100644
--- a/test/Index/get-cursor.cpp
+++ b/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])