diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 | 
| commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
| tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /lib/Tooling/CompilationDatabase.cpp | |
| parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) | |
Notes
Diffstat (limited to 'lib/Tooling/CompilationDatabase.cpp')
| -rw-r--r-- | lib/Tooling/CompilationDatabase.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp index 2272be632b9ea..957e40137eacb 100644 --- a/lib/Tooling/CompilationDatabase.cpp +++ b/lib/Tooling/CompilationDatabase.cpp @@ -299,13 +299,15 @@ FixedCompilationDatabase(Twine Directory, ArrayRef<std::string> CommandLine) {    std::vector<std::string> ToolCommandLine(1, "clang-tool");    ToolCommandLine.insert(ToolCommandLine.end(),                           CommandLine.begin(), CommandLine.end()); -  CompileCommands.emplace_back(Directory, std::move(ToolCommandLine)); +  CompileCommands.emplace_back(Directory, StringRef(), +                               std::move(ToolCommandLine));  }  std::vector<CompileCommand>  FixedCompilationDatabase::getCompileCommands(StringRef FilePath) const {    std::vector<CompileCommand> Result(CompileCommands);    Result[0].CommandLine.push_back(FilePath); +  Result[0].Filename = FilePath;    return Result;  } @@ -325,7 +327,7 @@ namespace tooling {  // This anchor is used to force the linker to link in the generated object file  // and thus register the JSONCompilationDatabasePlugin.  extern volatile int JSONAnchorSource; -static int JSONAnchorDest = JSONAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED JSONAnchorDest = JSONAnchorSource;  } // end namespace tooling  } // end namespace clang  | 
