blob: 95c57f238e0acc3e56ab2ec382133a568b7e3dd8 [file] [log] [blame]
NAKAMURA Takumi78c02952012-07-17 05:09:20 +00001// RUN: rm -rf %t
2// RUN: mkdir %t
Rafael Espindola925213b2013-07-04 16:16:58 +00003// RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s \
Chad Rosier7a42ff52012-07-25 18:38:57 +00004// RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
5// RUN: -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \
Rafael Espindolacbbe1d42013-09-25 15:47:05 +00006// RUN: -Xclang -internal-isystem -Xclang /tmp/ \
7// RUN: -Xclang -internal-externc-isystem -Xclang /tmp/ \
Chad Rosier7a42ff52012-07-25 18:38:57 +00008// RUN: -DFOO=BAR 2>&1 | FileCheck %s
NAKAMURA Takumi78c02952012-07-17 05:09:20 +00009// RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
10// RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
David Blaikie5d577a22012-06-29 22:03:56 +000011// REQUIRES: crash-recovery
12
Rafael Espindola5c6c7072013-07-04 16:23:44 +000013// because of the glob (*.c, *.sh)
14// REQUIRES: shell
15
Rafael Espindola925213b2013-07-04 16:16:58 +000016// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null 2>&1 | FileCheck %s
Richard Smith940a6d72012-12-25 21:56:27 +000017
Larisse Voufo4154f462013-08-06 03:57:41 +000018// FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed"
19// XFAIL: mingw32
20
David Blaikie5d577a22012-06-29 22:03:56 +000021#pragma clang __debug parser_crash
22// CHECK: Preprocessed source(s) and associated run script(s) are located at:
David Blaikiea6b4db82012-07-02 22:07:20 +000023// CHECK-NEXT: note: diagnostic msg: {{.*}}.c
24FOO
25// CHECKSRC: FOO
Hans Wennborgb212b342013-09-12 18:23:34 +000026// CHECKSH: -cc1
Chad Rosier959f0b32012-07-25 17:52:16 +000027// CHECKSH: -D "FOO=BAR"
28// CHECKSH-NOT: -F/tmp/
29// CHECKSH-NOT: -I /tmp/
Chad Rosier7a42ff52012-07-25 18:38:57 +000030// CHECKSH-NOT: -idirafter /tmp/
Chad Rosier959f0b32012-07-25 17:52:16 +000031// CHECKSH-NOT: -iquote /tmp/
Chad Rosier7a42ff52012-07-25 18:38:57 +000032// CHECKSH-NOT: -isystem /tmp/
33// CHECKSH-NOT: -iprefix /the/prefix
34// CHECKSH-NOT: -iwithprefix /tmp/
35// CHECKSH-NOT: -iwithprefixbefore /tmp/
Chad Rosierae7581d2012-07-25 18:55:43 +000036// CHECKSH-NOT: -internal-isystem /tmp/
37// CHECKSH-NOT: -internal-externc-isystem /tmp/
Chad Rosier83f16bf2012-10-31 18:31:33 +000038// CHECKSH-NOT: -dwarf-debug-flags