[cfe-commits] [PATCH] Validate C99 and C++03's set of UCNs

Richard Smith richard at metafoo.co.uk
Fri Jan 25 15:56:13 PST 2013


  OK, looks like your interpretation of 'digits' is probably the intended one.


================
Comment at: lib/Lex/Lexer.cpp:2797-2803
@@ +2796,9 @@
+        DiagnosticsEngine &Diags = PP->getDiagnostics();
+        DiagnosticsEngine::Level CompatLevel =
+          Diags.getDiagnosticLevel(diag::warn_cxx11_ucn_escape_surrogate,
+                                   getSourceLocation());
+        if (CompatLevel > DiagnosticsEngine::Ignored)
+          Diag(BufferPtr, diag::warn_cxx11_ucn_escape_surrogate);
+        else
+          Diag(BufferPtr, diag::warn_ucn_escape_surrogate);
+      }
----------------
This is a bit weird. What if warn_ucn_escape_surrogate is an error but warn_cxx11_ucn_escape_surrogate is just a warning? Perhaps have just one warning, but put it in both CXX11Compat and Unicode groups?


http://llvm-reviews.chandlerc.com/D327



More information about the cfe-commits mailing list