diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-06-19 23:15:35 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-06-19 23:15:35 +0000 |
commit | 11b3ba71760f219d92606f9b514c3869f7825a61 (patch) | |
tree | caef4643fee2ee7aed2d9412211658a2d6a1ef6a /clang | |
parent | d364078a32097aaaba77ebcb9fbf5b883dc247d9 (diff) | |
download | bcm5719-llvm-11b3ba71760f219d92606f9b514c3869f7825a61.tar.gz bcm5719-llvm-11b3ba71760f219d92606f9b514c3869f7825a61.zip |
[libclang] Make sure crash-recovery for module-building does not interfere with libclang crash-recovery.
This tests llvm commit r184380.
rdar://14204560
llvm-svn: 184383
Diffstat (limited to 'clang')
-rw-r--r-- | clang/test/Index/crash-recovery-modules.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Index/crash-recovery-modules.m b/clang/test/Index/crash-recovery-modules.m index 23740ec98b3..431c23f7dca 100644 --- a/clang/test/Index/crash-recovery-modules.m +++ b/clang/test/Index/crash-recovery-modules.m @@ -15,6 +15,21 @@ @import Crash; +#ifdef LIBCLANG_CRASH +#pragma clang __debug crash +#endif + void test() { const char* error = getCrashString(); } + + +// RUN: rm -rf %t +// Check that libclang crash-recovery works; both with a module building crash... +// RUN: not env CINDEXTEST_FAILONERROR=1 c-index-test -test-load-source all -fmodules -fmodules-cache-path=%t -Xclang -fdisable-module-hash -I %S/Inputs/Headers -DCRASH -DLIBCLANG_CRASH %s 2> %t.err +// RUN: FileCheck < %t.err -check-prefix=CHECK-LIBCLANG-CRASH %s +// ...and with module building successful. +// RUN: not env CINDEXTEST_FAILONERROR=1 c-index-test -test-load-source all -fmodules -fmodules-cache-path=%t -Xclang -fdisable-module-hash -I %S/Inputs/Headers -DLIBCLANG_CRASH %s 2> %t.err +// RUN: FileCheck < %t.err -check-prefix=CHECK-LIBCLANG-CRASH %s +// CHECK-LIBCLANG-CRASH: libclang: crash detected during parsing +// CHECK-LIBCLANG-CRASH: Unable to load translation unit! |