[clang] [analyzer] Remove barely used class 'KnownSVal' (NFC) (PR #86953)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 2 01:28:21 PDT 2024
================
@@ -1238,12 +1238,12 @@ class StoreSiteFinder final : public TrackingBugReporterVisitor {
/// changes to its value in a nested stackframe could be pruned, and
/// this visitor can prevent that without polluting the bugpath too
/// much.
- StoreSiteFinder(bugreporter::TrackerRef ParentTracker, KnownSVal V,
+ StoreSiteFinder(bugreporter::TrackerRef ParentTracker, SVal V,
const MemRegion *R, TrackingOptions Options,
const StackFrameContext *OriginSFC = nullptr)
: TrackingBugReporterVisitor(ParentTracker), R(R), V(V), Options(Options),
OriginSFC(OriginSFC) {
- assert(R);
+ assert(!V.isUnknown() && R);
----------------
NagyDonat wrote:
Actually, I realized that it's better to avoid asserting that `V` is not unknown. This is a precondition that _happens to be satisfied_ because this class is constructed in one single location and that is preceded by a `!V.isUnknown()` check -- but I'm fairly certain that the actual implementation of `StoreSiteFinder` can find a site where `UnknownVal` was stored in a region.
https://github.com/llvm/llvm-project/pull/86953
More information about the cfe-commits
mailing list