]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Analysis/crash-trace.c
Vendor import of clang trunk r338150:
[FreeBSD/FreeBSD.git] / test / Analysis / crash-trace.c
1 // RUN: not --crash %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection %s 2>&1 | FileCheck %s
2 // REQUIRES: crash-recovery
3
4 // FIXME: CHECKs might be incompatible to win32.
5 // Stack traces also require back traces.
6 // REQUIRES: shell, backtrace
7
8 void clang_analyzer_crash(void);
9
10 void inlined() {
11   clang_analyzer_crash();
12 }
13
14 void test() {
15   inlined();
16 }
17
18 // CHECK: 0.    Program arguments: {{.*}}clang
19 // CHECK-NEXT: 1.       <eof> parser at end of file
20 // CHECK-NEXT: 2. While analyzing stack: 
21 // CHECK-NEXT:  #0 Calling inlined at line 15
22 // CHECK-NEXT:  #1 Calling test
23 // CHECK-NEXT: 3.       {{.*}}crash-trace.c:{{[0-9]+}}:3: Error evaluating statement