[PATCH] D60873: [clang][HeaderSuggestion] Handle the case of dotdot with an absolute path

Sam McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 08:28:35 PST 2022


sammccall added a comment.
Herald added projects: clang-tools-extra, All.

I think this introduced a bug: if your search path has `/usr/bin/../include/c++/v1`, then you'll end up with `FileEntry`s with `Name` like `/usr/bin/../include/c++/v1/__utility/move.h`. Calling the `FileEntry` overload of `suggestPathToFileForDiagnostics` won't return the relative path, because it will strip dots from the dir path but not the fileentry's Name.

Fix is probably to strip dots from both, I guess.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60873/new/

https://reviews.llvm.org/D60873



More information about the llvm-commits mailing list