djasper added inline comments.
================ Comment at: lib/Format/Format.cpp:1542 }; - for (auto Line : AnnotatedLines) { - if (LineContainsObjCCode(*Line)) + llvm::DenseSet<AnnotatedLine *> LinesToCheckSet; + LinesToCheckSet.reserve(AnnotatedLines.size()); ---------------- Wouldn't it be much easier to call this function recursively for Children instead of using the lambda as well as this additional set? Lines and their children should form a tree, I think, so you should never see the same line again during recursion. Repository: rC Clang https://reviews.llvm.org/D44831 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits