]> granicus.if.org Git - clang/commitdiff
Fix another crash and actually make the test case work.
authorAnders Carlsson <andersca@mac.com>
Fri, 5 Jun 2009 02:45:24 +0000 (02:45 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 5 Jun 2009 02:45:24 +0000 (02:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72913 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp
test/SemaTemplate/default-arguments.cpp

index c9277aab7525227707939439aa8b40969147d24d..685bbf8420f1d2d6a7b476db9a8900a6ee600512 100644 (file)
@@ -2371,7 +2371,7 @@ Sema::ActOnExplicitInstantiation(Scope *S, SourceLocation TemplateLoc,
   // arguments in the specialization.
   QualType WrittenTy 
     = Context.getTemplateSpecializationType(Name, 
-                                            &TemplateArgs[0],
+                                            TemplateArgs.data(),
                                             TemplateArgs.size(),
                                   Context.getTypeDeclType(Specialization));
   Specialization->setTypeAsWritten(WrittenTy);
index 0e4c36609dc1bd3f5239dd9b918cb7847df6989d..5b6ab7d1552c211d85cab821408120b92dd1a5a5 100644 (file)
@@ -11,5 +11,5 @@ template<typename U = float, int M> struct X;
 
 X<> *x4;
 
-template<typename T = int> struct Z;
+template<typename T = int> struct Z { };
 template struct Z<>;