]> granicus.if.org Git - clang/commitdiff
[Sema] Use the right FoldingSet.
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 12 Jun 2017 17:44:30 +0000 (17:44 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 12 Jun 2017 17:44:30 +0000 (17:44 +0000)
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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305207 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp

index 62b19685c677ff7bdc837a678f7f940acb4319f9..d06bbf507861aea04f7027d5fc50296758eb9afe 100644 (file)
@@ -3565,7 +3565,7 @@ QualType ASTContext::getSubstTemplateTypeParmPackType(
     = new (*this, TypeAlignment) SubstTemplateTypeParmPackType(Parm, Canon,
                                                                ArgPack);
   Types.push_back(SubstParm);
-  SubstTemplateTypeParmTypes.InsertNode(SubstParm, InsertPos);
+  SubstTemplateTypeParmPackTypes.InsertNode(SubstParm, InsertPos);
   return QualType(SubstParm, 0);  
 }