summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2016-07-11 07:47:04 +0000
committerHaojian Wu <hokein@google.com>2016-07-11 07:47:04 +0000
commitd1218758e12977f0241748c8d421b04a37e5518b (patch)
tree93ccab9cfca89653a20aef8ce05f38d46887b94f /clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
parentcba9f80ba87610b5f46f1baccbad548f2f15f0c6 (diff)
downloadbcm5719-llvm-d1218758e12977f0241748c8d421b04a37e5518b.tar.gz
bcm5719-llvm-d1218758e12977f0241748c8d421b04a37e5518b.zip
[clang-tidy] Pass absolute path to OptionsProvider::getOptions/getRawOptions.
Summary: Although there is no guarantee of getOptions/getRawOptions receiving an absolute path, we try to make it if possible. So FileOptionProvider subclasses don't have to convert the path to an absolute path. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D22154 llvm-svn: 275051
Diffstat (limited to 'clang-tools-extra/clang-tidy/ClangTidyOptions.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidyOptions.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp b/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
index e18e02e134a..4dd21967af7 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyOptions.cpp
@@ -218,15 +218,6 @@ FileOptionsProvider::FileOptionsProvider(
std::vector<OptionsSource>
FileOptionsProvider::getRawOptions(StringRef FileName) {
DEBUG(llvm::dbgs() << "Getting options for file " << FileName << "...\n");
- SmallString<256> FilePath(FileName);
-
- if (std::error_code EC = llvm::sys::fs::make_absolute(FilePath)) {
- llvm::errs() << "Can't make absolute path from " << FileName << ": "
- << EC.message() << "\n";
- // FIXME: Figure out what to do.
- } else {
- FileName = FilePath;
- }
std::vector<OptionsSource> RawOptions =
DefaultOptionsProvider::getRawOptions(FileName);
OpenPOWER on IntegriCloud