[PATCH] D105759: [WIP] Implement P2361 Unevaluated string literals

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 28 11:56:08 PDT 2021


aaron.ballman added inline comments.


================
Comment at: clang/lib/Lex/LiteralSupport.cpp:1821-1823
+                << UDSuffixBuf << UDSuffix
+                << SourceRange(UDSuffixTokLoc, UDSuffixTokLoc)
+                << SourceRange(TokLoc, TokLoc);
----------------
erichkeane wrote:
> cor3ntin wrote:
> > aaron.ballman wrote:
> > > 
> > This are actually used by `err_string_concat_mixed_suffix`
> right, i guess it is just super awkward to have unused parameters passed like this.  I know we only check the other direction, but seems awkward.  Aaron, thoughts?
I'd split it into two calls at this point. e.g.,
```
if (UnevaluatedStringHasUDL)
  Diags->Report(TokLoc, diag::err_unevaluated_string_udl) << ...;
else
  Diags->Report(TokLoc, diag::err_string_concat_mixed_suffix) << ...;
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105759/new/

https://reviews.llvm.org/D105759



More information about the cfe-commits mailing list