This revision was automatically updated to reflect the committed changes.
Closed by commit rL366455: [clangd] Get rid of dots and dotsdots within
GlobalCompilationDatabase (authored by kadircet, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior
kadircet updated this revision to Diff 210594.
kadircet added a comment.
- Address comments
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64860/new/
https://reviews.llvm.org/D64860
Files:
clang-tools-extra/clangd/FS.cpp
sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
As discussed, the long-term fix might be to avoid ever encountering these paths
(filtering everything we get over LSP, CDBs etc).
Maybe add a fixme on removeDots?
Repository:
rG LLVM
kadircet updated this revision to Diff 210354.
kadircet marked 5 inline comments as done.
kadircet added a comment.
- Add removeDots helper to FS.h
- Revert changes in getFallbackCommands.
- Add comments for the reasoning behind removeDots calls.
Repository:
rG LLVM Github Monorepo
CHANGES
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:77
GlobalCompilationDatabase::getFallbackCommand(PathRef File) const {
+ llvm::SmallString<128> CanonPath(File);
+ llvm::sys::path::remove_dots(CanonPath, true);
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/GlobalCompilationDatabase.cpp:77
GlobalCompilationDatabase::getFallbackCommand(PathRef File) const {
+ llvm::SmallString<128> CanonPath(File);
+ llvm::sys::path::remove_dots(CanonPath, true);
kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay,
ilya-biryukov.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D64860
Files: