diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-06 17:40:26 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-06 17:40:26 +0000 |
commit | 8a60bbe13f1d75daf0fc1812e17252a0a6003352 (patch) | |
tree | ec98716dff236141f582661abff8252f0ceb6d84 /clang/test/Index/werror.c | |
parent | 6ee1d2bd78ea24b2dc26656b97a9701ad7913883 (diff) | |
download | bcm5719-llvm-8a60bbe13f1d75daf0fc1812e17252a0a6003352.tar.gz bcm5719-llvm-8a60bbe13f1d75daf0fc1812e17252a0a6003352.zip |
Keep track of when "unrecoverable" errors occur, then allow
clang_saveTranslationUnit() to save a PCH file if the only errors it
contains are recoverable errors. Fixes <rdar://problem/9727804>.
llvm-svn: 134503
Diffstat (limited to 'clang/test/Index/werror.c')
-rw-r--r-- | clang/test/Index/werror.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Index/werror.c b/clang/test/Index/werror.c new file mode 100644 index 00000000000..150095d8599 --- /dev/null +++ b/clang/test/Index/werror.c @@ -0,0 +1,15 @@ +inline int *get_int_ptr(float *fp) { + return fp; +} + +#ifdef FATAL +void fatal(int); +void fatal(float); +#endif + +// CHECK-FATAL: translation errors + +// RUN: c-index-test -write-pch %t.pch -Werror %s +// RUN: not c-index-test -write-pch %t.pch -DFATAL -Werror %s 2>%t.err +// RUN: FileCheck -check-prefix=CHECK-FATAL %s < %t.err + |