summaryrefslogtreecommitdiff
path: root/source/Symbol/ClangExternalASTSourceCallbacks.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
commite81d9d49145e432d917eea3a70d2ae74dcad1d89 (patch)
tree9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/Symbol/ClangExternalASTSourceCallbacks.cpp
parent85d8ef8f1f0e0e063a8571944302be2d2026f823 (diff)
Notes
Diffstat (limited to 'source/Symbol/ClangExternalASTSourceCallbacks.cpp')
-rw-r--r--source/Symbol/ClangExternalASTSourceCallbacks.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/Symbol/ClangExternalASTSourceCallbacks.cpp b/source/Symbol/ClangExternalASTSourceCallbacks.cpp
index cd6972cce9720..6c804f4d969ce 100644
--- a/source/Symbol/ClangExternalASTSourceCallbacks.cpp
+++ b/source/Symbol/ClangExternalASTSourceCallbacks.cpp
@@ -41,6 +41,7 @@
#endif
#include "lldb/Core/Log.h"
+#include "clang/AST/Decl.h"
using namespace clang;
using namespace lldb_private;
@@ -160,3 +161,16 @@ ClangExternalASTSourceCallbacks::layoutRecordType(
return false;
}
+void
+ClangExternalASTSourceCallbacks::FindExternalLexicalDecls (const clang::DeclContext *decl_ctx,
+ llvm::function_ref<bool(clang::Decl::Kind)> IsKindWeWant,
+ llvm::SmallVectorImpl<clang::Decl *> &decls)
+{
+ if (m_callback_tag_decl && decl_ctx)
+ {
+ clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(const_cast<clang::DeclContext *>(decl_ctx));
+ if (tag_decl)
+ CompleteType(tag_decl);
+ }
+}
+