[PATCH] D17149: Consolidate and improve the handling of built-in feature-like macros

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 4 13:06:23 PDT 2016

rsmith accepted this revision.
rsmith added a reviewer: rsmith.
This revision is now accepted and ready to land.

Comment at: lib/Lex/PPMacroExpansion.cpp:1489-1492
@@ +1488,6 @@
+        // a diagnostic and a dummy value.
+        if (Result.hasValue())
+          OS << Result.getValue();
+        else {
+          OS << 0;
+          if (!SuppressDiagnostic)
I think this can be done without any changes to any `Op` implementation: each of them already diagnoses a left paren just as it would diagnose any other unexpected token. But the custom diagnostic also seems fine.


More information about the cfe-commits mailing list