[PATCH] D64860: [clangd] Get rid of dots and dotsdots within GlobalCompilationDatabase

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 17 09:55:33 PDT 2019


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 wrote:
> This patch lacks a bit of context (why are we changing this behavior).
> Based on offline discussion, it's not clear to me why this particular change to getFallbackCommand is necessary or desirable. (Compared to others, which seem like fairly obvious bugs, even if the reason to fix them isn't obvious)
updating the summary for reasoning


================
Comment at: clang-tools-extra/clangd/unittests/GlobalCompilationDatabaseTests.cpp:307
+  EXPECT_TRUE(DB.getProjectInfo(File));
+  EXPECT_EQ(DB.getFallbackCommand(File).Directory, testRoot());
+}
----------------
sammccall wrote:
> Is this actually important/desirable?
yea agreed this is not necessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64860





More information about the cfe-commits mailing list