[clang] [C2y] Add octal prefixes, deprecate unprefixed octals (PR #131626)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 17 10:12:57 PDT 2025
================
@@ -582,6 +582,12 @@ class Lexer : public PreprocessorLexer {
/// sequence.
static bool isNewLineEscaped(const char *BufferStart, const char *Str);
+ /// Diagnose use of a delimited or named escape sequence.
+ static void DiagnoseDelimitedOrNamedEscapeSequence(SourceLocation Loc,
+ bool Named,
+ const LangOptions &Opts,
+ DiagnosticsEngine &Diags);
+
----------------
AaronBallman wrote:
It's called from LiteralSupport.cpp, so it could be a non-member function, but I think it's a bit cleaner to scope it to the `Lexer` to make it clear this is emitting lexer-based diagnostics. WDYT?
https://github.com/llvm/llvm-project/pull/131626
More information about the cfe-commits
mailing list