A few comments, but otherwise this looks good. Thank you for working on this. Do you have commit access?
================ Comment at: lib/Format/UnwrappedLineParser.h:88 @@ -87,3 +87,3 @@ void parseIfThenElse(); - void parseForOrWhileLoop(); + void parseForOrWhileOrForEachLoop(); void parseDoWhile(); ---------------- I don't see any reason to rename this. ForEachLoops are for loops (which also include range-based for loops). ================ Comment at: lib/Format/UnwrappedLineParser.cpp:663 @@ -659,1 +662,3 @@ + return; + } default: ---------------- Don't fall through implicitly, add "break;". ================ Comment at: lib/Format/UnwrappedLineParser.cpp:1051 @@ -1046,1 +1050,3 @@ + FormatTok->IsForEachMacro) && + "'for' or 'while' or foreach macro expected"); nextToken(); ---------------- Nit: 'for', 'while' or foreach macro expected. http://llvm-reviews.chandlerc.com/D2919 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
