mirror of https://gitlab.com/cppit/libclangmm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
385 B
16 lines
385 B
|
11 years ago
|
#include "CompilationDatabase.h"
|
||
|
|
|
||
|
|
clang::CompilationDatabase::
|
||
|
|
CompilationDatabase(const std::string &project_path) {
|
||
|
|
CXCompilationDatabase_Error error;
|
||
|
|
db_ = clang_CompilationDatabase_fromDirectory(project_path.c_str(), &error);
|
||
|
|
if(error) {
|
||
|
|
// TODO(user) error code...
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
clang::CompilationDatabase::
|
||
|
|
~CompilationDatabase() {
|
||
|
|
clang_CompilationDatabase_dispose(db_);
|
||
|
|
}
|