Skip to content

Commit

Permalink
[Sema] Use the right FoldingSet.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gburgessiv committed Jun 12, 2017
1 parent c90ce64 commit e2037d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/AST/ASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit e2037d4

Please sign in to comment.