summaryrefslogtreecommitdiffstats
path: root/test/Index/pragma-diag-reparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/pragma-diag-reparse.c')
-rw-r--r--test/Index/pragma-diag-reparse.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/Index/pragma-diag-reparse.c b/test/Index/pragma-diag-reparse.c
index efe59b1..71d0618 100644
--- a/test/Index/pragma-diag-reparse.c
+++ b/test/Index/pragma-diag-reparse.c
@@ -1,13 +1,20 @@
-// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local %s | FileCheck %s
+#pragma clang diagnostic ignored "-Wtautological-compare"
+#include "pragma_disable_warning.h"
int main (int argc, const char * argv[])
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- int x;
+ int x=0;
#pragma clang diagnostic pop
- return 0;
+ return x;
}
-// CHECK: pragma-diag-reparse.c:7:7: VarDecl=x:7:7 (Definition) Extent=[7:3 - 7:8]
+void foo() { int b=0; while (b==b); }
+
+// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_FAILONERROR=1 c-index-test -test-load-source-reparse 5 local \
+// RUN: -I%S/Inputs \
+// RUN: %s -Wall -Werror | FileCheck %s
+
+// CHECK: pragma-diag-reparse.c:8:7: VarDecl=x:8:7 (Definition) Extent=[8:3 - 8:10]
OpenPOWER on IntegriCloud