[clang] [clang][analyzer] Less redundant warnings from FixedAddressChecker (PR #110458)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 30 01:39:19 PDT 2024
================
@@ -43,6 +43,12 @@ void FixedAddressChecker::checkPreStmt(const BinaryOperator *B,
if (!T->isPointerType())
return;
+ // Omit warning if the RHS has already pointer type.
+ // The value may come from a variable and is candidate for a previous warning
+ // from the checker.
----------------
NagyDonat wrote:
```suggestion
// Omit warning if the RHS has already pointer type. Without this passing
// around one fixed value in several pointer variables would produce several
// redundant warnings.
```
https://github.com/llvm/llvm-project/pull/110458
More information about the cfe-commits
mailing list