arphaman added a comment.

Is there any way to test this change?

> This saves more than 5% of the parsing time according to perf.

That sounds great. What did you test the parsing on? Will this patch get 
similar improvements for code that compiles without errors and warnings?



================
Comment at: lib/Basic/DiagnosticIDs.cpp:423
+    Mapping = &Pos->State->getOrAddMapping((diag::kind)DiagID);
+  }
 
----------------
I think it would be better if you wrap this piece of code in a static function 
that returns `DiagnosticMapping &`, as it should allow you to get rid of all 
these `.` to `->` changes below.


https://reviews.llvm.org/D26465



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

Reply via email to