From ea266cad53e3d49771fa38103913d3ec7a166694 Mon Sep 17 00:00:00 2001 From: dim Date: Mon, 10 Jun 2013 20:45:12 +0000 Subject: Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3 release): http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final@183502 --- lib/Sema/SemaTemplateInstantiate.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/Sema/SemaTemplateInstantiate.cpp') diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index f755b8c..7ef04e9 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -2701,11 +2701,10 @@ void LocalInstantiationScope::InstantiatedLocal(const Decl *D, Decl *Inst) { llvm::PointerUnion &Stored = LocalDecls[D]; if (Stored.isNull()) Stored = Inst; - else if (Stored.is()) { + else if (DeclArgumentPack *Pack = Stored.dyn_cast()) + Pack->push_back(Inst); + else assert(Stored.get() == Inst && "Already instantiated this local"); - Stored = Inst; - } else - LocalDecls[D].get()->push_back(Inst); } void LocalInstantiationScope::InstantiatedLocalPackArg(const Decl *D, -- cgit v1.1