aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Tooling/CompilationDatabase.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Tooling/CompilationDatabase.h')
-rw-r--r--include/clang/Tooling/CompilationDatabase.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Tooling/CompilationDatabase.h b/include/clang/Tooling/CompilationDatabase.h
index 625c8eced4..0dec6f8f87 100644
--- a/include/clang/Tooling/CompilationDatabase.h
+++ b/include/clang/Tooling/CompilationDatabase.h
@@ -81,6 +81,13 @@ public:
static CompilationDatabase *loadFromDirectory(StringRef BuildDirectory,
std::string &ErrorMessage);
+ /// \brief Tries to detect a compilation database location and load it.
+ ///
+ /// Looks for a compilation database in all parent paths by calling
+ /// loadFromDirectory.
+ static CompilationDatabase *autoDetectFromSource(StringRef SourceFile,
+ std::string &ErrorMessage);
+
/// \brief Returns all compile commands in which the specified file was
/// compiled.
///
@@ -215,4 +222,3 @@ private:
} // end namespace clang
#endif // LLVM_CLANG_TOOLING_COMPILATION_DATABASE_H
-