[clang] [Clang] Treat line directives as header names. (PR #211512)
Yihan Wang via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 23 04:35:34 PDT 2026
================
@@ -1599,6 +1599,21 @@ static bool GetLineValue(Token &DigitTok, unsigned &Val,
return false;
}
+// Unlike header-names, line directive only support filenames in double quotes
+// but does support empty filenames.
+static void GetFilenameSpellingForLineDirective(const Preprocessor &PP,
----------------
yronglin wrote:
nit: This looks very similer to `Preprocessor::GetIncludeFilenameSpelling`. Do we need to merge it into the existing function? Or rename it to `GetLineDirectiveFilenameSpelling`?
https://github.com/llvm/llvm-project/pull/211512
More information about the cfe-commits
mailing list