[all-commits] [llvm/llvm-project] 6dc0ca: [clang][lex] Fix non-portability diagnostics with ...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Thu Dec 7 15:25:07 PST 2023


  Branch: refs/heads/users/jansvoboda11/absolute-case-mismatch
  Home:   https://github.com/llvm/llvm-project
  Commit: 6dc0ca62b2f678622538d7d9f40b73b196895956
      https://github.com/llvm/llvm-project/commit/6dc0ca62b2f678622538d7d9f40b73b196895956
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2023-12-07 (Thu, 07 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

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.

rdar://91172342




More information about the All-commits mailing list