[Lldb-commits] [lldb] r177085 - Fixed a problem where we didn't return TypedefNameDecls

Sean Callanan scallanan at apple.com
Thu Mar 14 10:21:54 PDT 2013


Author: spyffe
Date: Thu Mar 14 12:21:53 2013
New Revision: 177085

URL: http://llvm.org/viewvc/llvm-project?rev=177085&view=rev
Log:
Fixed a problem where we didn't return TypedefNameDecls
when clang asked for them by name.

Modified:
    lldb/trunk/source/Expression/ClangASTSource.cpp

Modified: lldb/trunk/source/Expression/ClangASTSource.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangASTSource.cpp?rev=177085&r1=177084&r2=177085&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangASTSource.cpp (original)
+++ lldb/trunk/source/Expression/ClangASTSource.cpp Thu Mar 14 12:21:53 2013
@@ -1821,6 +1821,14 @@ NameSearchContext::AddTypeDecl(void *typ
             
             return (NamedDecl*)interface_decl;
         }
+        else if (const TypedefType *typedef_type = qual_type->getAs<TypedefType>())
+        {
+            TypedefNameDecl *typedef_name_decl = typedef_type->getDecl();
+            
+            m_decls.push_back(typedef_name_decl);
+            
+            return (NamedDecl*)typedef_name_decl;
+        }
     }
     return NULL;
 }





More information about the lldb-commits mailing list