aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Analysis/z3-unarysymexpr.c
blob: ed9ba72468422e24853ec9f592ecdd8872e8bcb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s \
// RUN:  -analyzer-constraints=z3 

// REQUIRES: Z3
//
// Previously Z3 analysis crashed when it encountered an UnarySymExpr, validate
// that this no longer happens.
//

// expected-no-diagnostics
int negate(int x, int y) {
  if ( ~(x && y))
    return 0;
  return 1;
}