[PATCH] Append CXXDefaultInitExpr's wrapped expression to the CFG when visiting a constructor initializer

Jordan Rose jordan_rose at apple.com
Mon Feb 3 09:45:55 PST 2014


  This is fine but it doesn't turn it on for anybody. Unless Richard has any objections, I think it's fine to turn this on for -Wuninitialized, just not for the analyzer. It looks like one good place to do this is in AnalysisManager, which is only used by the analyzer.


================
Comment at: lib/Analysis/CFG.cpp:773-775
@@ -772,1 +772,5 @@
     }
+    CXXDefaultInitExpr *Default;
+    if (BuildOpts.AddCXXDefaultInitExprInCtors &&
+        (Default = dyn_cast<CXXDefaultInitExpr>(Init))) {
+      // In general, appending the expression wrapped by a CXXDefaultInitExpr
----------------
I would do this using nested ifs but otherwise this looks good.


http://llvm-reviews.chandlerc.com/D2370



More information about the cfe-commits mailing list