error-on-deserialized.c 576 B

12345678910111213
  1. #include "targeted-top.h"
  2. // This tests that we will correctly error out on the deserialized decl.
  3. // RUN: c-index-test -write-pch %t.h.pch %S/targeted-top.h
  4. // RUN: env CINDEXTEST_FAILONERROR=1 not c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \
  5. // RUN: -Xclang -error-on-deserialized-decl=NestedVar1
  6. // RUN: env CINDEXTEST_FAILONERROR=1 not c-index-test -cursor-at=%S/targeted-nested1.h:2:16 %s -include %t.h \
  7. // RUN: -Xclang -error-on-deserialized-decl=NestedVar1 2>&1 \
  8. // RUN: | FileCheck %s
  9. // CHECK: error: NestedVar1 was deserialized