LGTM with a couple of tiny tweaks.

================
Comment at: lib/Lex/PPMacroExpansion.cpp:710-713
@@ +709,6 @@
+         ParenLocation != ParenEnd; ++ParenLocation) {
+      if (DB.hasMaxFixItsHints())
+        break;
+      DB << FixItHint::CreateInsertion(ParenLocation->getBegin(), "(")
+         << FixItHint::CreateInsertion(ParenLocation->getEnd(), ")");
+    }
----------------
For robustness, please check hasMaxFixItHints between adding the two fixits 
here. The maximum might not always be even.

================
Comment at: include/clang/Basic/Diagnostic.h:987
@@ +986,3 @@
+
+  bool hasMaxFixItsHints() const {
+    return NumFixits == DiagnosticsEngine::MaxFixItHints;
----------------
Should be "hasMaxFixItHints" presumably?


http://llvm-reviews.chandlerc.com/D986
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to