================ @@ -0,0 +1,16 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s \ +// RUN: -analyzer-constraints=z3 + +// REQUIRES: Z3 +// +// This LIT covers a crash associated with this test. +// The expectation is to not crash! +// + +long a; +void b() { + long c; + if (~(b && a)) // expected-warning {{address of function 'b' will always evaluate to 'true'}} + // expected-note@-1 {{prefix with the address-of operator to silence this warning}} + c ^= 0; // expected-warning {{The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage}} ---------------- NagyDonat wrote:
It would be better to have a simpler testcase, e.g. ```c // expected-no-diagnostics int negate(int x) { return -x; } ``` or something similar. https://github.com/llvm/llvm-project/pull/108900 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits