[clang] [Clang][Preprocessor] Unify header-name lookahead for import and include (PR #191004)
Yihan Wang via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 4 01:20:18 PDT 2026
================
@@ -4695,11 +4696,17 @@ bool Lexer::LexDependencyDirectiveToken(Token &Result) {
MIOpt.ReadToken();
}
- if (ParsingFilename && DDTok.is(tok::less)) {
- BufferPtr = BufferStart + DDTok.Offset;
- LexAngledStringLiteral(Result, BufferPtr + 1);
- if (Result.isNot(tok::header_name))
+ const char *DDTokPtr = BufferStart + DDTok.Offset;
+ if (ParsingFilename && *DDTokPtr == '<') {
----------------
yronglin wrote:
I have add a new test for dep-scan, we don't need a `SkipEscapedNewLines`, because DDTok.Offset already skipped the escaped new line.
https://github.com/llvm/llvm-project/pull/191004
More information about the cfe-commits
mailing list