llvm-project/clang/test/Analysis/reference.cpp

12 lines
248 B
C++
Raw Normal View History

// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
void f1() {
int const &i = 3;
int b = i;
2010-01-10 10:52:56 +08:00
int *p = 0;
if (b != 3)
*p = 1; // no-warning
}