aaron.ballman added inline comments.

================
Comment at: lib/AST/ASTDumper.cpp:1476-1477
 
   for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) {
-    dumpChild([=] {
-      const auto Assoc = E->getAssociation(I);
-      const TypeSourceInfo *TSI = Assoc.getTypeSourceInfo();
-      if (TSI) {
-        OS << "case ";
-        NodeDumper.dumpType(TSI->getType());
-      } else {
-        OS << "default";
-      }
-
-      if (Assoc.IsSelected())
-        OS << " selected";
-
-      if (TSI)
-        dumpTypeAsChild(TSI->getType());
-      dumpStmt(Assoc.getExpr());
-    });
+    Visit(E->getAssociation(I));
   }
----------------
aaron.ballman wrote:
> You can change this to be a range-based for loop over the associations to 
> clean it up even further. `for (const auto *A = E->getAssocExprs())`
Ah, I see now that this is over the new `Association` objects, not the old 
`Expr *` objects. I'll add comments on the other review, but same guideline 
here.


Repository:
  rC Clang

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

https://reviews.llvm.org/D56960



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to