rsmith added inline comments.
================
Comment at: include/clang/Basic/DiagnosticLexKinds.td:189-190
InGroup<CXXPre1zCompatPedantic>, DefaultIgnore;
+def err_cxx1z_string_view_literal : Error<
+ "string_view literals are a C++1z feature">;
def ext_binary_literal : Extension<
----------------
I don't see a need for a custom diagnostic for this. Using our normal "reserved
ud-suffix" diagnostic seems fine, and it doesn't make sense to treat this
suffix as a hard error but accept all the rest with a warning.
================
Comment at: lib/Lex/LiteralSupport.cpp:1716-1717
+StringLiteralParser::UDSuffixResult
+StringLiteralParser::isValidUDSuffix(const LangOptions &LangOpts,
+ StringRef Suffix) {
+ if (!LangOpts.CPlusPlus11 || Suffix.empty())
----------------
Just make this call `NumericLiteralParser::isValidUDSuffix` and then check for
the `sv` case. All the numeric suffixes are also valid string literal suffixes
for the form `operator""suffix`.
https://reviews.llvm.org/D26829
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits