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/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index ff54250..60b23c8 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -679,6 +679,13 @@
     
     if (var)
         AddOneVariable(context, var);
+    
+    /* Commented out pending resolution of a loop when the TagType is imported
+    lldb::TypeSP type = m_sym_ctx->FindTypeByName(name_cs);
+    
+    if (type.get())
+        AddOneType(context, type.get());
+    */
 }
         
 Value *
@@ -886,3 +893,15 @@
     if (log)
         log->Printf("Found function %s, returned (NamedDecl)%p", context.Name.getAsString().c_str(), fun_decl);    
 }
+
+void 
+ClangExpressionDeclMap::AddOneType(NameSearchContext &context, 
+                                   Type *type)
+{
+    TypeFromUser ut(type->GetOpaqueClangQualType(),
+                    type->GetClangAST());
+    
+    void *copied_type = ClangASTContext::CopyType(context.GetASTContext(), ut.GetASTContext(), ut.GetOpaqueQualType());
+    
+    context.AddTypeDecl(copied_type);
+}