PreVisitDeclStmt wasn't getting called for C++ aggregate initializers.

 - jim

Index: lib/Checker/GRExprEngine.cpp
===================================================================
--- lib/Checker/GRExprEngine.cpp        (revision 115801)
+++ lib/Checker/GRExprEngine.cpp        (working copy)
@@ -2682,7 +2682,12 @@
     if (getContext().getLangOptions().CPlusPlus && InitTy->isRecordType()) {
// Delegate expressions of C++ record type evaluation to AggExprVisitor.
       VisitAggExpr(InitEx, GetState(Pred)->getLValue(VD,
- Pred->getLocationContext()), Pred, Dst); + Pred->getLocationContext()), Pred, Tmp);
+      // FIXME: remove later when all paths through VisitAggExpr work properly
+      if (Tmp.empty())
+        Tmp.Add(Pred);
+      // call checkers for initialized aggregates
+      CheckerVisit(DS, Dst, Tmp, PreVisitStmtCallback);
       return;
     } else if (VD->getType()->isReferenceType())
       VisitLValue(InitEx, Pred, Tmp);

Attachment: VisitDecl.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to