global_region_invalidation.mm revision fbdbed3bde8577815826b9d15790e5effb913f7b
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s 2 3void clang_analyzer_eval(int); 4 5void use(int); 6id foo(int x) { 7 if (x) 8 return 0; 9 static id p = foo(1); 10 clang_analyzer_eval(p == 0); // expected-warning{{TRUE}} 11 return p; 12} 13 14const int &globalInt = 42; 15 16void testGlobal() { 17 // FIXME: Should be TRUE, but should at least not crash. 18 clang_analyzer_eval(globalInt == 42); // expected-warning{{UNKNOWN}} 19} 20