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/error-on-deserialized.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 clang/test/Index/error-on-deserialized.c (limited to 'clang/test/Index/error-on-deserialized.c') diff --git a/clang/test/Index/error-on-deserialized.c b/clang/test/Index/error-on-deserialized.c new file mode 100644 index 0000000..8ba8283 --- /dev/null +++ b/clang/test/Index/error-on-deserialized.c @@ -0,0 +1,13 @@ + +#include "targeted-top.h" + +// This tests that we will correctly error out on the deserialized decl. + +// RUN: c-index-test -write-pch %t.h.pch %S/targeted-top.h +// RUN: env CINDEXTEST_FAILONERROR=1 not c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \ +// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 +// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \ +// RUN: -Xclang -error-on-deserialized-decl=NestedVar1 2>&1 \ +// RUN: | FileCheck %s + +// CHECK: error: NestedVar1 was deserialized -- cgit v1.2.3