Skip to content

Commit 7baebfb

Browse files
committed
[clang][lexer] Make Lexer::getEscapedNewLineSize public
This is so that we can use it in the dependency scanner without duplicating the logic there.
1 parent 8597237 commit 7baebfb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/include/clang/Lex/Lexer.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,11 @@ class Lexer : public PreprocessorLexer {
585585
/// sequence.
586586
static bool isNewLineEscaped(const char *BufferStart, const char *Str);
587587

588+
/// getEscapedNewLineSize - Return the size of the specified escaped newline,
589+
/// or 0 if it is not an escaped newline. P[-1] is known to be a "\" on entry
590+
/// to this function.
591+
static unsigned getEscapedNewLineSize(const char *P);
592+
588593
/// Diagnose use of a delimited or named escape sequence.
589594
static void DiagnoseDelimitedOrNamedEscapeSequence(SourceLocation Loc,
590595
bool Named,
@@ -725,11 +730,6 @@ class Lexer : public PreprocessorLexer {
725730
/// method.
726731
SizedChar getCharAndSizeSlow(const char *Ptr, Token *Tok = nullptr);
727732

728-
/// getEscapedNewLineSize - Return the size of the specified escaped newline,
729-
/// or 0 if it is not an escaped newline. P[-1] is known to be a "\" on entry
730-
/// to this function.
731-
static unsigned getEscapedNewLineSize(const char *P);
732-
733733
/// SkipEscapedNewLines - If P points to an escaped newline (or a series of
734734
/// them), skip over them and return the first non-escaped-newline found,
735735
/// otherwise return P.

0 commit comments

Comments
 (0)