xref: /minix3/external/bsd/llvm/dist/clang/test/Index/error-on-deserialized.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc 
2*f4a2713aSLionel Sambuc #include "targeted-top.h"
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc // This tests that we will correctly error out on the deserialized decl.
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc // RUN: c-index-test -write-pch %t.h.pch %S/targeted-top.h
7*f4a2713aSLionel Sambuc // RUN: env CINDEXTEST_FAILONERROR=1 not c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \
8*f4a2713aSLionel Sambuc // RUN:    -Xclang -error-on-deserialized-decl=NestedVar1
9*f4a2713aSLionel Sambuc // RUN: env CINDEXTEST_FAILONERROR=1 not c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \
10*f4a2713aSLionel Sambuc // RUN:    -Xclang -error-on-deserialized-decl=NestedVar1 2>&1 \
11*f4a2713aSLionel Sambuc // RUN:  | FileCheck %s
12*f4a2713aSLionel Sambuc 
13*f4a2713aSLionel Sambuc // CHECK: error: NestedVar1 was deserialized
14