[clang] [clang][analyzer] PointerSubChecker should not warn on pointers converted to numerical value (PR #111846)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 10 08:57:46 PDT 2024
================
@@ -61,6 +61,10 @@ void PointerSubChecker::checkPreStmt(const BinaryOperator *B,
if (LR->getSymbolicBase() || RR->getSymbolicBase())
return;
+ if (!B->getLHS()->getType()->isPointerType() ||
+ !B->getRHS()->getType()->isPointerType())
+ return;
----------------
balazske wrote:
The function `isPointerType` uses already the canonical type.
https://github.com/llvm/llvm-project/pull/111846
More information about the cfe-commits
mailing list