diff options
author | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
---|---|---|
committer | Zancanaro; Carlo <czan8762@plang3.cs.usyd.edu.au> | 2012-09-24 09:58:17 +1000 |
commit | 222e2a7620e6520ffaf4fc4e69d79c18da31542e (patch) | |
tree | 7bfbc05bfa3b41c8f9d2e56d53a0bc3e310df239 /clang/test/Index/crash-recovery-modules.m | |
parent | 3d206f03985b50beacae843d880bccdc91a9f424 (diff) |
Add the clang library to the repo (with some of my changes, too).
Diffstat (limited to 'clang/test/Index/crash-recovery-modules.m')
-rw-r--r-- | clang/test/Index/crash-recovery-modules.m | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/Index/crash-recovery-modules.m b/clang/test/Index/crash-recovery-modules.m new file mode 100644 index 0000000..212923f --- /dev/null +++ b/clang/test/Index/crash-recovery-modules.m @@ -0,0 +1,20 @@ +// Clear out the module cache entirely, so we start from nothing. +// RUN: rm -rf %t + +// Parse the file, such that building the module will cause Clang to crash. +// RUN: not env CINDEXTEST_FAILONERROR=1 c-index-test -test-load-source all -fmodules -fmodule-cache-path %t -Xclang -fdisable-module-hash -I %S/Inputs/Headers -DCRASH %s 2> %t.err +// RUN: FileCheck < %t.err -check-prefix=CHECK-CRASH %s +// CHECK-CRASH: crash-recovery-modules.m:16:32:{16:2-16:37}: fatal error: could not build module 'Crash' + +// Parse the file again, without crashing, to make sure that +// subsequent parses do the right thing. +// RUN: env CINDEXTEST_FAILONERROR=1 c-index-test -test-load-source all -fmodules -fmodule-cache-path %t -Xclang -fdisable-module-hash -I %S/Inputs/Headers %s + +// REQUIRES: crash-recovery +// REQUIRES: shell + +@__experimental_modules_import Crash; + +void test() { + const char* error = getCrashString(); +} |