diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2017-02-27 03:52:36 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2017-02-27 03:52:36 +0000 |
commit | cf486b24baea24818a169983334cb681c3478616 (patch) | |
tree | 819b2d666fca9e881acecac2fb45fd853b157fbb /clang/test | |
parent | aa5c52744b1cb7bc2b015e89ca5993cd25f768a2 (diff) | |
download | bcm5719-llvm-cf486b24baea24818a169983334cb681c3478616.tar.gz bcm5719-llvm-cf486b24baea24818a169983334cb681c3478616.zip |
[GeneratePCHAction] If preprocessor option 'AllowPCHWithCompilerErrors' is enabled, don't delete the produced PCH file if error diagnostics occurred.
llvm-svn: 296320
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Index/pch-from-libclang.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/Index/pch-from-libclang.c b/clang/test/Index/pch-from-libclang.c index f6ee81e0cdc..349fcac01ec 100644 --- a/clang/test/Index/pch-from-libclang.c +++ b/clang/test/Index/pch-from-libclang.c @@ -6,18 +6,21 @@ // RUN: %clang_cc1 -fsyntax-only %s -verify // RUN: c-index-test -write-pch %t.h.pch %s -fmodules -fmodules-cache-path=%t.mcp -Xclang -triple -Xclang x86_64-apple-darwin // RUN: %clang -fsyntax-only -include %t.h %s -Xclang -verify -fmodules -fmodules-cache-path=%t.mcp -Xclang -detailed-preprocessing-record -Xclang -triple -Xclang x86_64-apple-darwin -Xclang -fallow-pch-with-compiler-errors +// RUN: %clang -x c-header %s -o %t.clang.h.pch -fmodules -fmodules-cache-path=%t.mcp -Xclang -detailed-preprocessing-record -Xclang -triple -Xclang x86_64-apple-darwin -Xclang -fallow-pch-with-compiler-errors -Xclang -verify +// RUN: c-index-test -test-load-source local %s -include %t.clang.h -fmodules -fmodules-cache-path=%t.mcp -Xclang -triple -Xclang x86_64-apple-darwin | FileCheck %s #ifndef HEADER #define HEADER -struct S { int x; }; - void some_function(undeclared_type p); // expected-error{{unknown type name}} +struct S { int x; }; + #else // expected-no-diagnostics void test(struct S *s) { + // CHECK: [[@LINE+1]]:6: MemberRefExpr=x:[[@LINE-6]]:16 s->x = 0; } |