aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Tooling
diff options
context:
space:
mode:
authorArnaud A. de Grandmaison <arnaud.adegm@gmail.com>2012-07-10 16:56:35 +0000
committerArnaud A. de Grandmaison <arnaud.adegm@gmail.com>2012-07-10 16:56:35 +0000
commit4187df5f7bdda66d2fbe64a3f2660ee3977f0d12 (patch)
treebaedd49d77407d0b23084d24558bbdf450d8124f /include/clang/Tooling
parent5ba0559f2f0ddd62de16547af514dbaf93b79585 (diff)
Adds support for auto-detection of compilation databases, looking in a directory and all its parents.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Tooling')
-rw-r--r--include/clang/Tooling/CompilationDatabase.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/clang/Tooling/CompilationDatabase.h b/include/clang/Tooling/CompilationDatabase.h
index 0dec6f8f87..143c65e313 100644
--- a/include/clang/Tooling/CompilationDatabase.h
+++ b/include/clang/Tooling/CompilationDatabase.h
@@ -83,11 +83,18 @@ public:
/// \brief Tries to detect a compilation database location and load it.
///
- /// Looks for a compilation database in all parent paths by calling
- /// loadFromDirectory.
+ /// Looks for a compilation database in all parent paths of file 'SourceFile'
+ /// by calling loadFromDirectory.
static CompilationDatabase *autoDetectFromSource(StringRef SourceFile,
std::string &ErrorMessage);
+ /// \brief Tries to detect a compilation database location and load it.
+ ///
+ /// Looks for a compilation database in directory 'SourceDir' and all
+ /// its parent paths by calling loadFromDirectory.
+ static CompilationDatabase *autoDetectFromDirectory(StringRef SourceDir,
+ std::string &ErrorMessage);
+
/// \brief Returns all compile commands in which the specified file was
/// compiled.
///