On 19 Nov 2016 2:36 am, "Anton Bikineev" <ant.bikin...@gmail.com> wrote:
AntonBikineev added inline comments. ================ Comment at: lib/Lex/LiteralSupport.cpp:1716-1717 +StringLiteralParser::UDSuffixResult +StringLiteralParser::isValidUDSuffix(const LangOptions &LangOpts, + StringRef Suffix) { + if (!LangOpts.CPlusPlus11 || Suffix.empty()) ---------------- rsmith wrote: > 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`. This makes sense for the call sites we currently have. > All the numeric suffixes are also valid string literal suffixes for the form operator""suffix. Don't really understand this part. It seems inconsistent if one calls, say, ``` StringLiteralParser::isValidUDSuffix(LangOpts(), "if") ``` and gets ```true``` That is valid in the case of `operator ""if`, so `if` is a valid string literal suffix (as is any numeric literal suffix). https://reviews.llvm.org/D26829
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits