brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1018 B · 857b3a2 Raw
31 lines · c
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-ONLY3// RUN: not --crash %clang_analyze_cc1 -analyzer-checker=debug.ExprInspection \4// RUN:   -x c++ %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-CXX-ONLY5// REQUIRES: crash-recovery6 7// Stack traces require back traces.8// REQUIRES: backtrace9 10void clang_analyzer_crash(void);11 12void inlined(int x, float y) {13  clang_analyzer_crash();14}15 16void test(void) {17  inlined(0, 0);18}19 20// CHECK:                0. Program arguments: {{.*}}clang21// CHECK-NEXT:           1. <eof> parser at end of file22// CHECK-NEXT:           2. While analyzing stack:23//24// CHECK-C-ONLY-NEXT:       #0 Calling inlined at line 1725// CHECK-C-ONLY-NEXT:       #1 Calling test26//27// CHECK-CXX-ONLY-NEXT:     #0 Calling inlined(int, float) at line 1728// CHECK-CXX-ONLY-NEXT:     #1 Calling test()29//30// CHECK-NEXT:           3. {{.*}}crash-trace.c:{{[0-9]+}}:3: Error evaluating statement31