[all-commits] [llvm/llvm-project] e24eb1: [Clang] Treat line directives as header names. (#2...
Corentin Jabot via All-commits
all-commits at lists.llvm.org
Wed Jul 29 10:04:40 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e24eb10725e514cece9a21da97040165a199f23c
https://github.com/llvm/llvm-project/commit/e24eb10725e514cece9a21da97040165a199f23c
Author: Corentin Jabot <corentinjabot at gmail.com>
Date: 2026-07-29 (Wed, 29 Jul 2026)
Changed paths:
M clang-tools-extra/clangd/unittests/PreambleTests.cpp
M clang/include/clang/Lex/Preprocessor.h
M clang/lib/Frontend/FrontendAction.cpp
M clang/lib/Frontend/PrintPreprocessedOutput.cpp
M clang/lib/Frontend/Rewrite/InclusionRewriter.cpp
M clang/lib/Lex/PPDirectives.cpp
R clang/test/Frontend/linemarker-invalid-escape.c
M clang/test/Frontend/rewrite-includes.c
M clang/test/Modules/cxx20-hu-05.cpp
M clang/test/Modules/cxx20-hu-06.cpp
M clang/test/Parser/cxx11-user-defined-literals.cpp
M clang/test/Preprocessor/line-directive-output.c
M clang/test/Preprocessor/line-directive.c
M clang/test/VFS/external-names-multi-overlay.c
M clang/test/VFS/fallback.c
Log Message:
-----------
[Clang] Treat line directives as header names. (#211512)
We treated line directives as being unevaluated string literal. However
- The standard has no such restriction - or rather the standard has
different, unclear restriction (https://wg21.link/CWG2693)
- Because of Windows paths, it's common for "C:\foo\bar" to be used, and
these should not form escape sequences.
To remain consistent with other implementations, we do not allow `#line
1 <>` at this time. We do however support `#line 1 ""` to avoid a
breaking change.
Fixes a regression introduced by #201413
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list