[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 18 02:51:49 PST 2020


martong added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:872
+///
+/// Example: \c class T : public S { using S::S; }; T(1);
+class CXXInheritedConstructorCall : public AnyFunctionCall {
----------------
Perhaps the example could provide the definition of  the class `S` too.


================
Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:436
   case CXXConstructExpr::CK_Complete: {
+    assert(CE && "Complete constructors cannot be inherited!");
     std::tie(State, Target) =
----------------
Should there be rather `CIE` in the assert? Or the text after `&&` is confusing. 


================
Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:494
   if (State != Pred->getState()) {
+    assert(CE && "Inherited constructors do not have construction contexts!");
     static SimpleProgramPointTag T("ExprEngine",
----------------
`CIE` ?


================
Comment at: clang/lib/StaticAnalyzer/Core/SymbolManager.cpp:545
 
+    // Anonymous parameters of an inheriting constructor are live for the entire
+    // duration of the constructor.
----------------
`live` -> `alive` ?


Repository:
  rC Clang

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

https://reviews.llvm.org/D74735





More information about the cfe-commits mailing list