[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Analysis / crash-trace.c
blob857b3a228d07f6e66fc6bccf8d6a1b528808ea1a
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
7 // Stack traces require back traces.
8 // REQUIRES: backtrace
10 void clang_analyzer_crash(void);
12 void inlined(int x, float y) {
13 clang_analyzer_crash();
16 void test(void) {
17 inlined(0, 0);
20 // CHECK: 0. Program arguments: {{.*}}clang
21 // CHECK-NEXT: 1. <eof> parser at end of file
22 // CHECK-NEXT: 2. While analyzing stack:
24 // CHECK-C-ONLY-NEXT: #0 Calling inlined at line 17
25 // CHECK-C-ONLY-NEXT: #1 Calling test
27 // CHECK-CXX-ONLY-NEXT: #0 Calling inlined(int, float) at line 17
28 // CHECK-CXX-ONLY-NEXT: #1 Calling test()
30 // CHECK-NEXT: 3. {{.*}}crash-trace.c:{{[0-9]+}}:3: Error evaluating statement