1 // RUN: not --crash %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection \
2 // RUN:   -x c   %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-C-ONLY
3 // RUN: not --crash %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection \
4 // RUN:   -x c++ %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-CXX-ONLY
5 // REQUIRES: crash-recovery
6 
7 // Stack traces require back traces.
8 // REQUIRES: backtrace
9 
10 void clang_analyzer_crash(void);
11 
inlined(int x,float y)12 void inlined(int x, float y) {
13   clang_analyzer_crash();
14 }
15 
test()16 void test() {
17   inlined(0, 0);
18 }
19 
20 // CHECK:                0. Program arguments: {{.*}}clang
21 // CHECK-NEXT:           1. <eof> parser at end of file
22 // CHECK-NEXT:           2. While analyzing stack:
23 //
24 // CHECK-C-ONLY-NEXT:       #0 Calling inlined at line 17
25 // CHECK-C-ONLY-NEXT:       #1 Calling test
26 //
27 // CHECK-CXX-ONLY-NEXT:     #0 Calling inlined(int, float) at line 17
28 // CHECK-CXX-ONLY-NEXT:     #1 Calling test()
29 //
30 // CHECK-NEXT:           3. {{.*}}crash-trace.c:{{[0-9]+}}:3: Error evaluating statement
31