[Lldb-commits] [lldb] r145667 - /lldb/trunk/source/Symbol/ClangASTContext.cpp

Greg Clayton gclayton at apple.com
Thu Dec 1 18:09:28 PST 2011


Author: gclayton
Date: Thu Dec  1 20:09:28 2011
New Revision: 145667

URL: http://llvm.org/viewvc/llvm-project?rev=145667&view=rev
Log:
<rdar://problem/10394517>

Fixed templates with NonTypeTemplateParmDecl objects. For example:

template <unsigned N>
....

This fixes SmallVector and all of the other classes that have template params
that are non types.


Modified:
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=145667&r1=145666&r2=145667&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Dec  1 20:09:28 2011
@@ -1169,7 +1169,7 @@
                                                                              depth, 
                                                                              i,
                                                                              &ast->Idents.get(name), 
-                                                                             template_param_infos.args[i].getAsType(), 
+                                                                             template_param_infos.args[i].getIntegralType(), 
                                                                              parameter_pack, 
                                                                              NULL));
                                             
@@ -1202,7 +1202,14 @@
                                                               SourceLocation(),
                                                               SourceLocation(),
                                                               &identifier_info);
-    
+
+    for (size_t i=0, template_param_decl_count = template_param_decls.size();
+         i < template_param_decl_count;
+         ++i)
+    {
+        template_param_decls[i]->setDeclContext (template_cxx_decl);
+    }
+
     // With templated classes, we say that a class is templated with
     // specializations, but that the bare class has no functions.
     template_cxx_decl->startDefinition();





More information about the lldb-commits mailing list