[all-commits] [llvm/llvm-project] f0691b: [clang][lex] Fix non-portability diagnostics with ...
Jan Svoboda via All-commits
all-commits at lists.llvm.org
Mon Dec 18 12:11:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f0691bcdf90bc44d0737e3395423e84b075ab84a
https://github.com/llvm/llvm-project/commit/f0691bcdf90bc44d0737e3395423e84b075ab84a
Author: Jan Svoboda <jan_svoboda at apple.com>
Date: 2023-12-18 (Mon, 18 Dec 2023)
Changed paths:
M clang/lib/Lex/PPDirectives.cpp
A clang/test/Lexer/case-insensitive-include-absolute.c
Log Message:
-----------
[clang][lex] Fix non-portability diagnostics with absolute path (#74782)
The existing code incorrectly assumes that `Path` can be empty. It
can't, it always contains at least `<` or `"`. On Unix, this patch fixes
an incorrect diagnostics that instead of `"/Users/blah"` suggested
`"Userss/blah"`. In assert builds, this would outright crash.
This patch also fixes a bug on Windows that would prevent the diagnostic
being triggered due to separator mismatch.
rdar://91172342
More information about the All-commits
mailing list