djasper added inline comments.

================
Comment at: lib/Format/Format.cpp:1491
@@ -1471,3 +1490,3 @@
 
   std::unique_ptr<Environment> Env =
       Environment::CreateVirtualEnvironment(Code, FileName, /*Ranges=*/{});
----------------
I think you should pull this part out into a separate function, possibly named 
getOffsetAfterHeaderGuardsAndComments(). This function is growing too much.

================
Comment at: lib/Format/Format.cpp:1500
@@ +1499,3 @@
+  // Get the first token.
+  Lex.LexFromRawLexer(Tok);
+  skipComments(Lex, Tok);
----------------
Can this go wrong? Maybe in an empty file?


http://reviews.llvm.org/D20959



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

Reply via email to