[clang] [Clang] allow `` `@$ `` in raw string delimiters in C++26 (PR #93216)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 30 09:55:11 PDT 2024
amilendra wrote:
Hello @cor3ntin
This patch has resulted in strings that were previously rejected are now accepted by the compiler.
https://godbolt.org/z/c1jcGv76z
```
int main() {
(void) R"\t()\t";
(void) R"\f()\f";
(void) R"\n()\n";
(void) R"\v()\v";
}
```
My reasoning is that those strings should be rejected because the specification says that the reverse solidus (`\`) is not allowed in the delimiter sequence.
https://eel.is/c++draft/lex.string#nt:d-char
> any member of the basic character set except:
> U+0020 space, U+0028 left parenthesis, U+0029 right parenthesis, U+005c reverse solidus,
> U+0009 character tabulation, U+000b line tabulation, U+000c form feed, and new-line
Would you please check and fix if you agree with this analysis?
https://github.com/llvm/llvm-project/pull/93216
More information about the cfe-commits
mailing list