Author: gbiv Date: Mon Jun 12 12:44:30 2017 New Revision: 305207 URL: http://llvm.org/viewvc/llvm-project?rev=305207&view=rev Log: [Sema] Use the right FoldingSet.
We were doing FindNodeOrInsertPos on SubstTemplateTypeParmPackTypes, so we should presumably be inserting into SubstTemplateTypeParmPackTypes. Looks like the FoldingSet API can be tweaked a bit so that we can catch things like this at compile-time. I'll look into that shortly. I'm unsure of how to test this; suggestions welcome. Thanks to Vladimir Voskresensky for bringing this up! Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified: cfe/trunk/lib/AST/ASTContext.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=305207&r1=305206&r2=305207&view=diff ============================================================================== --- cfe/trunk/lib/AST/ASTContext.cpp (original) +++ cfe/trunk/lib/AST/ASTContext.cpp Mon Jun 12 12:44:30 2017 @@ -3565,7 +3565,7 @@ QualType ASTContext::getSubstTemplateTyp = new (*this, TypeAlignment) SubstTemplateTypeParmPackType(Parm, Canon, ArgPack); Types.push_back(SubstParm); - SubstTemplateTypeParmTypes.InsertNode(SubstParm, InsertPos); + SubstTemplateTypeParmPackTypes.InsertNode(SubstParm, InsertPos); return QualType(SubstParm, 0); } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits