• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -analyze -analyzer-constraints=z3 -setup-static-analyzer \
2 // RUN:   -analyzer-checker=core,debug.ExprInspection %s 2>&1 | FileCheck %s
3 //
4 // REQUIRES: z3
5 //
6 // Works only with the z3 constraint manager.
7 
8 void clang_analyzer_printState();
9 
foo(int x)10 void foo(int x) {
11   if (x == 3) {
12     clang_analyzer_printState();
13     (void)x;
14     // CHECK: "constraints": [
15     // CHECK-NEXT: { "symbol": "(reg_$[[#]]<int x>) == 3", "range": "(= reg_$[[#]] #x00000003)" }
16   }
17 }
18