Index: clang-tools-extra/trunk/include-fixer/find-all-symbols/FindAllSymbols.cpp =================================================================== --- clang-tools-extra/trunk/include-fixer/find-all-symbols/FindAllSymbols.cpp +++ clang-tools-extra/trunk/include-fixer/find-all-symbols/FindAllSymbols.cpp @@ -17,7 +17,6 @@ #include "clang/Tooling/Tooling.h" #include "llvm/ADT/Optional.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/Path.h" using namespace clang::ast_matchers; @@ -76,21 +75,7 @@ if (FilePath.empty()) return llvm::None; - llvm::SmallString<128> AbsolutePath; - if (llvm::sys::path::is_absolute(FilePath)) { - AbsolutePath = FilePath; - } else { - auto WorkingDir = SM.getFileManager() - .getVirtualFileSystem() - ->getCurrentWorkingDirectory(); - if (!WorkingDir) - return llvm::None; - AbsolutePath = *WorkingDir; - llvm::sys::path::append(AbsolutePath, FilePath); - } - - llvm::sys::path::remove_dots(AbsolutePath, true); - return SymbolInfo(ND->getNameAsString(), Type, AbsolutePath.str(), + return SymbolInfo(ND->getNameAsString(), Type, FilePath.str(), GetContexts(ND), SM.getExpansionLineNumber(Loc)); } Index: clang-tools-extra/trunk/include-fixer/find-all-symbols/SymbolInfo.h =================================================================== --- clang-tools-extra/trunk/include-fixer/find-all-symbols/SymbolInfo.h +++ clang-tools-extra/trunk/include-fixer/find-all-symbols/SymbolInfo.h @@ -55,7 +55,7 @@ /// \brief Get symbol type. SymbolKind getSymbolKind() const; - /// \brief Get the file path where symbol comes from + /// \brief Get a relative file path where symbol comes from. llvm::StringRef getFilePath() const; /// \brief Get symbol contexts. @@ -77,7 +77,8 @@ /// \brief Symbol type. SymbolKind Type; - /// \brief The file path where the symbol comes from. + /// \brief The file path where the symbol comes from. It's a relative file + /// path based on the build directory. std::string FilePath; /// \brief Contains information about symbol contexts. Context information is