ioeric added inline comments.

================
Comment at: lib/Format/Format.cpp:1822
@@ +1821,3 @@
+        cleanupRight(Line->First, Line->Last, tok::comma, tok::comma);
+        checkConstructorInitList(*Line);
+      }
----------------
djasper wrote:
> You could turn this into:
> 
>     for (auto &Line : AnnotatedLines) {
>       if (Line->Affected) {
>         cleanupRight(Line->First, tok::comma, tok::comma);
>         cleanupRight(Line->First, TT_CtorInitializerColon, tok::comma);
>         cleanupLeft(Line->First, tok::comma, tok::l_brace);
>         cleanupLeft(Line->First, TT_CtorInitializerColon, tok::l_brace);
>       }
>     }
Wouldn't `cleanupLeft(Line->First, tok::comma, tok::l_brace);` also remove the 
comma from  `std::vector<std::vector<int>> = {{...}, {...}}`?


http://reviews.llvm.org/D19804



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

Reply via email to