Files
clang-p2996/clang/test/Analysis/solver-sym-simplification-bool.cpp
Vince Bridgers d39ebdae67 [analyzer] Cleanup a FIXME in SValBuilder.cpp
This change follows up on a FIXME submitted with D105974. This change simply let's the reference case fall through to return a concrete 'true'
instead of a nonloc pointer of appropriate length set to NULL.

Reviewed By: NoQ

Differential Revision: https://reviews.llvm.org/D107720
2021-08-10 16:12:52 -05:00

11 lines
290 B
C++

// RUN: %clang_analyze_cc1 -analyze -analyzer-checker=core \
// RUN: -analyzer-checker=debug.ExprInspection -verify %s
void clang_analyzer_dump(bool);
void foo(int &x) {
int *p = &x; // 'p' is the same SVal as 'x'
bool b = p;
clang_analyzer_dump(b); // expected-warning {{1 U1b}}
}