[PATCH] D95307: [StaticAnalyzer] Add checking for degenerate base class in MemRegion
Kirill Romanenkov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 27 14:29:32 PST 2021
kromanenkov added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Core/BasicValueFactory.cpp:199
- for (const auto &I : llvm::reverse(PathRange))
- PathList = prependCXXBase(I, PathList);
+ llvm::SmallPtrSet<QualType, 32> BaseTypes;
+ for (const auto &BaseSpec : PathList)
----------------
What if we get the situation of the repeated types in the `PathRange`?
Like `Derived` --(cast to)-> `Base` --(cast to)-> `Derived` --(cast to)-> `Base` and so on.
Do we need to store the pair of `QualType` and `PathRange` index for that case or only type will be enough?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95307/new/
https://reviews.llvm.org/D95307
More information about the cfe-commits
mailing list