Skip to content

Commit 245def9

Browse files
committed
[Clang][NFC] Put potentially expensive check behind NDEBUG
1 parent 534d221 commit 245def9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6607,9 +6607,12 @@ QualType ASTContext::getDeducedTemplateSpecializationTypeInternal(
66076607
auto *DTST = new (*this, alignof(DeducedTemplateSpecializationType))
66086608
DeducedTemplateSpecializationType(Template, DeducedType, IsDependent,
66096609
Canon);
6610+
6611+
#ifndef NDEBUG
66106612
llvm::FoldingSetNodeID TempID;
66116613
DTST->Profile(TempID);
66126614
assert(ID == TempID && "ID does not match");
6615+
#endif
66136616
Types.push_back(DTST);
66146617
DeducedTemplateSpecializationTypes.InsertNode(DTST, InsertPos);
66156618
return QualType(DTST, 0);

0 commit comments

Comments
 (0)