From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/Index/pragma-diag-reparse.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 clang/test/Index/pragma-diag-reparse.c (limited to 'clang/test/Index/pragma-diag-reparse.c') diff --git a/clang/test/Index/pragma-diag-reparse.c b/clang/test/Index/pragma-diag-reparse.c new file mode 100644 index 0000000..71d0618 --- /dev/null +++ b/clang/test/Index/pragma-diag-reparse.c @@ -0,0 +1,20 @@ +#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=0; +#pragma clang diagnostic pop + + return x; +} + +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] -- cgit v1.2.3