Add test case for ? : crasher
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94429 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Index/load-exprs.c b/test/Index/load-exprs.c
index ea4d0ea..cafb32e 100644
--- a/test/Index/load-exprs.c
+++ b/test/Index/load-exprs.c
@@ -4,6 +4,7 @@
T* t_ptr = (T *)ptr;
(void)sizeof(T);
struct X x = (struct X){1, 2};
+ void *xx = ptr ? : &x;
}
// RUN: c-index-test -test-load-source all %s | FileCheck %s
@@ -12,3 +13,6 @@
// CHECK: load-exprs.c:5:16: TypeRef=T:1:13 [Extent=5:16:5:16]
// CHECK: load-exprs.c:6:10: TypeRef=struct X:2:8 [Extent=6:10:6:10]
// CHECK: load-exprs.c:6:24: TypeRef=struct X:2:8 [Extent=6:24:6:24]
+// CHECK: load-exprs.c:7:9: VarDecl=xx:7:9 (Definition) [Extent=7:3:7:23]
+// CHECK: load-exprs.c:7:14: DeclRefExpr=ptr:3:14 [Extent=7:14:7:16]
+// CHECK: load-exprs.c:7:23: DeclRefExpr=x:6:12 [Extent=7:23:7:23]
diff --git a/test/Index/load-stmts.cpp b/test/Index/load-stmts.cpp
index 86d4b62..65f4857 100644
--- a/test/Index/load-stmts.cpp
+++ b/test/Index/load-stmts.cpp
@@ -11,7 +11,6 @@
}
// RUN: c-index-test -test-load-source all %s | FileCheck %s
-// CHECK: load-stmts.cpp:3:6: UnexposedStmt= [Extent=3:15:11:1]
// CHECK: load-stmts.cpp:3:6: UnexposedStmt= [Extent=4:3:5:3]
// CHECK: load-stmts.cpp:3:6: UnexposedStmt= [Extent=4:8:4:15]
// CHECK: load-stmts.cpp:4:10: VarDecl=y:4:10 (Definition) [Extent=4:8:4:14]