[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:36 PDT 2019


NoQ added inline comments.


================
Comment at: clang/include/clang/Analysis/CFG.h:567
+///     &&, ||        |  expression that uses result of && or ||, RHS
+///     vbase inits   |  handled by superclass; not handled by superclass
 ///
----------------
Szelethus wrote:
> In the context of this patch, I understand what you mean, but without that, this might not be a good description for a class this important.
> 
> How about
> 
> ```
> ///     vbase inits   |  initialization handled by superclass;
> ///                   |  initialization not handled by superclass
> ```
> ?
Because this is a doxygen table syntax, i'm trying to make it look reasonable both in comments and in doxygen. In this sense it's hard to make line breaks in cells.

Hmm, btw, doxygen also fails to handle `||` because it thinks that it's a table cell delimiter. Let me fix that as well:

{F8921651}


================
Comment at: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:451
+  if (const auto *CallerCtor = dyn_cast_or_null<CXXConstructExpr>(
+          LCtx->getStackFrame()->getCallSite())) {
+    switch (CallerCtor->getConstructionKind()) {
----------------
Charusso wrote:
> May it is worth to handle the call outside to see whether it is non-null.
Mmm, what do you mean?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61816/new/

https://reviews.llvm.org/D61816





More information about the cfe-commits mailing list