|
|
|
@ -8,7 +8,6 @@ clang::TranslationUnit:: |
|
|
|
clang::TranslationUnit& clang::TranslationUnit:: |
|
|
|
clang::TranslationUnit& clang::TranslationUnit:: |
|
|
|
operator=(const clang::TranslationUnit &tu) { |
|
|
|
operator=(const clang::TranslationUnit &tu) { |
|
|
|
tu_ = tu.tu_; |
|
|
|
tu_ = tu.tu_; |
|
|
|
flags = tu.flags; |
|
|
|
|
|
|
|
return *this; |
|
|
|
return *this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -43,7 +42,8 @@ clang::TranslationUnit:: |
|
|
|
TranslationUnit(clang::Index *index, |
|
|
|
TranslationUnit(clang::Index *index, |
|
|
|
const std::string &filepath, |
|
|
|
const std::string &filepath, |
|
|
|
const std::vector<std::string> &command_line_args, |
|
|
|
const std::vector<std::string> &command_line_args, |
|
|
|
const std::map<std::string, std::string> &buffers) { |
|
|
|
const std::map<std::string, std::string> &buffers, |
|
|
|
|
|
|
|
unsigned flags) { |
|
|
|
std::vector<CXUnsavedFile> files; |
|
|
|
std::vector<CXUnsavedFile> files; |
|
|
|
for (auto &buffer : buffers) { |
|
|
|
for (auto &buffer : buffers) { |
|
|
|
CXUnsavedFile file; |
|
|
|
CXUnsavedFile file; |
|
|
|
@ -68,7 +68,8 @@ TranslationUnit(clang::Index *index, |
|
|
|
|
|
|
|
|
|
|
|
int clang::TranslationUnit:: |
|
|
|
int clang::TranslationUnit:: |
|
|
|
ReparseTranslationUnit(const std::string &file_path, |
|
|
|
ReparseTranslationUnit(const std::string &file_path, |
|
|
|
const std::map<std::string, std::string> &buffers) { |
|
|
|
const std::map<std::string, std::string> &buffers, |
|
|
|
|
|
|
|
unsigned flags) { |
|
|
|
std::vector<CXUnsavedFile> files; |
|
|
|
std::vector<CXUnsavedFile> files; |
|
|
|
for (auto &buffer : buffers) { |
|
|
|
for (auto &buffer : buffers) { |
|
|
|
CXUnsavedFile file; |
|
|
|
CXUnsavedFile file; |
|
|
|
@ -82,3 +83,7 @@ ReparseTranslationUnit(const std::string &file_path, |
|
|
|
files.data(), |
|
|
|
files.data(), |
|
|
|
flags); |
|
|
|
flags); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsigned clang::TranslationUnit::DefaultFlags() { |
|
|
|
|
|
|
|
return CXTranslationUnit_CacheCompletionResults | CXTranslationUnit_PrecompiledPreamble | CXTranslationUnit_Incomplete; |
|
|
|
|
|
|
|
} |
|
|
|
|