[PATCH] D61816: [CFG] [analyzer] pr41300: Add a branch to skip virtual base initializers when they are handled by the superclass.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 24 15:52:35 PDT 2019
NoQ updated this revision to Diff 201354.
NoQ marked 14 inline comments as done.
NoQ added a comment.
In D61816#1504590 <https://reviews.llvm.org/D61816#1504590>, @Szelethus wrote:
> Hmmm, how about this?
> ...
> You are right that all virtual bases as initialized before everything else, but not all ctor delegations are skipped. If not this specific one, can something similar screw us over?
> edit: Twin of the abomination above:
> ...
> edit2: What if the order of inheritance changes?
`VBase1(int)` is skipped because `B` is not the most derived class, `VBase2(std::string)` is not skipped because `C` is the most derived class. That's the whole point of the branch; i don't see a problem. AST handles the initialization order for us, all we need is to branch around it correctly. Added these tests^^
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61816/new/
https://reviews.llvm.org/D61816
Files:
clang/include/clang/Analysis/AnalysisDeclContext.h
clang/include/clang/Analysis/CFG.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
clang/lib/Analysis/AnalysisDeclContext.cpp
clang/lib/Analysis/CFG.cpp
clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp
clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
clang/test/Analysis/initializer.cpp
clang/test/Analysis/initializers-cfg-output.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61816.201354.patch
Type: text/x-patch
Size: 22085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190524/e2af92f0/attachment-0001.bin>
More information about the cfe-commits
mailing list