[PATCH] D122513: [analyzer] Fix "RhsLoc and LhsLoc bitwidth must be same"
Vince Bridgers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 26 16:47:55 PDT 2022
vabridgers added a comment.
Apparently, it's up to an implementation to determine the specific relations that can be computed between different address spaces. Perhaps a better way to deal with this for now, to avoid crashes, is follow the DereferenceChecker model. That checker punts on checking relations with any pointers that have a address space. If a downstream compiler wants to compute relations between pointers with address spaces, they are certainly free to do that - but I get the instinct this might not be best to push upstream :/
Ideas? Best!
Here's the snippet, and comment, from clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
...
112 static bool suppressReport(const Expr *E) {
113 // Do not report dereferences on memory in non-default address spaces.
114 return E->getType().hasAddressSpace();
115 }
...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122513/new/
https://reviews.llvm.org/D122513
More information about the cfe-commits
mailing list