[PATCH] D99344: [Analyzer] Track RValue expressions
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 30 03:50:30 PDT 2021
steakhal accepted this revision.
steakhal added a comment.
This revision is now accepted and ready to land.
land it
================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1938
+ ProgramStateRef RVState = RVNode->getState();
+ SVal V = RVState->getSValAsScalarOrLoc(E, RVNode->getLocationContext());
+ const auto *BO = dyn_cast<BinaryOperator>(E);
----------------
This note is not strictly for this patch.
At first, it wasn't clear to me why you call `getSValAsScalarOrLoc()`.
That just returns `unknown` if the Region is not boundable. Unfortunately, the `MemRegion::isBoundable()` has no documentation. IMO all virtual call deserves documentation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99344/new/
https://reviews.llvm.org/D99344
More information about the cfe-commits
mailing list