djasper added inline comments.

================
Comment at: lib/Format/Format.cpp:1707
@@ +1706,3 @@
+      if (NewCode) {
+        auto NewEnv = Environment::CreateVirtualEnvironment(
+            *NewCode, FileName,
----------------
mprobst wrote:
> I guess we don't worry about the performance consequences here?
I don't think so. Lexing is very fast and we do the same thing to sort 
includes. We only create a new virtual environment if there actually are quotes 
to change which should be rare and also creating this environment should be 
fast.

All in all, I'd ignore performance here until this actually shows up in a 
profile (or we trace a slow formatting back to it).


https://reviews.llvm.org/D24322



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

Reply via email to