summaryrefslogtreecommitdiffstats
path: root/test/Analysis/blocks-no-inline.c
blob: 1ec14e820b0e0ca790a0da668e60359116dabe41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-ipa=none -fblocks -verify %s

void clang_analyzer_eval(int);

void testInvalidation() {
  __block int i = 0;
  ^{
    ++i;
  }();

  // Under inlining, we will know that i == 1.
  clang_analyzer_eval(i == 0); // expected-warning{{UNKNOWN}}
}
OpenPOWER on IntegriCloud