Skip to content

Commit edff46e

Browse files
committed
Address review comments.
Assert that a node is not found when refreshing InsertPos.
1 parent ea310a6 commit edff46e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5877,9 +5877,9 @@ ASTContext::getSubstBuiltinTemplatePack(const TemplateArgument &ArgPack) {
58775877
Canon = getSubstBuiltinTemplatePack(CanonArgPack);
58785878
// Refresh InsertPos, in case the recursive call above caused rehashing,
58795879
// which would invalidate the bucket pointer.
5880-
if (auto *T =
5881-
SubstBuiltinTemplatePackTypes.FindNodeOrInsertPos(ID, InsertPos))
5882-
return QualType(T, 0);
5880+
[[maybe_unused]] const auto *Nothing =
5881+
SubstBuiltinTemplatePackTypes.FindNodeOrInsertPos(ID, InsertPos);
5882+
assert(!Nothing);
58835883
}
58845884

58855885
auto *PackType = new (*this, alignof(SubstBuiltinTemplatePackType))

0 commit comments

Comments
 (0)