[clang] [analyzer] Suppress core.FixedAddressDereference reports with volatile pointee (PR #181644)
Ziqing Luo via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 17 11:29:04 PST 2026
================
@@ -50,3 +50,21 @@ void test4() {
*x = 3; // expected-warning{{Dereference of a fixed address (loaded from variable 'x')}} \
// expected-note{{Dereference of a fixed address (loaded from variable 'x')}}
}
+
+void suppress_volatile_pointee(void) {
----------------
ziqingluo-90 wrote:
nit: we could have a test for having a `volatile int *` variable holding a fixed value. I'm sure it will work. Just for better test coverage.
https://github.com/llvm/llvm-project/pull/181644
More information about the cfe-commits
mailing list