================ @@ -2261,8 +2261,17 @@ bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, unsigned PrefixLen = 0; - while (PrefixLen != 16 && isRawStringDelimBody(CurPtr[PrefixLen])) + while (PrefixLen != 16 && isRawStringDelimBody(CurPtr[PrefixLen])) { ++PrefixLen; + if (!isLexingRawMode() && + llvm::is_contained({'$', '@', '`'}, CurPtr[PrefixLen])) { ---------------- zygoloid wrote:
There's an off-by-one error here: we're incrementing `PrefixLen` before checking the character, so this is checking the character *after* the one we just processed. Hence we don't diagnose `"@(foo)@"`, because the characters we look at are the `(` and `"` after the `@`s, not the `@`s themselves. https://github.com/llvm/llvm-project/pull/93216 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits