Added support for accessing members of C++ objects,
including superclass members.  This involved ensuring
that access control was ignored, and ensuring that
the operands of BitCasts were properly scanned for
variables that needed importing.

Also laid the groundwork for declaring objects of
custom types; however, this functionality is disabled
for now because of a potential loop in ASTImporter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110174 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangASTSource.cpp b/source/Expression/ClangASTSource.cpp
index 3f83acf..f914728 100644
--- a/source/Expression/ClangASTSource.cpp
+++ b/source/Expression/ClangASTSource.cpp
@@ -162,3 +162,22 @@
 
     return AddFunDecl(generic_function_type.getAsOpaquePtr());
 }
+
+clang::NamedDecl *NameSearchContext::AddTypeDecl(void *type)
+{
+    QualType QT = QualType::getFromOpaquePtr(type);
+    clang::Type *T = QT.getTypePtr();
+
+    if (TagType *tag_type = dyn_cast<clang::TagType>(T))
+    {
+        TagDecl *tag_decl = tag_type->getDecl();
+        
+        Decls.push_back(tag_decl);
+        
+        return tag_decl;
+    }
+    else
+    {
+        return NULL;
+    }
+}