Author: Corentin Jabot Date: 2025-05-08T13:27:50+02:00 New Revision: 245def9def7b025644a8cf991ba24c53a50822c6
URL: https://github.com/llvm/llvm-project/commit/245def9def7b025644a8cf991ba24c53a50822c6 DIFF: https://github.com/llvm/llvm-project/commit/245def9def7b025644a8cf991ba24c53a50822c6.diff LOG: [Clang][NFC] Put potentially expensive check behind NDEBUG Added: Modified: clang/lib/AST/ASTContext.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 1ed16748dff1a..92b246a83bcec 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -6607,9 +6607,12 @@ QualType ASTContext::getDeducedTemplateSpecializationTypeInternal( auto *DTST = new (*this, alignof(DeducedTemplateSpecializationType)) DeducedTemplateSpecializationType(Template, DeducedType, IsDependent, Canon); + +#ifndef NDEBUG llvm::FoldingSetNodeID TempID; DTST->Profile(TempID); assert(ID == TempID && "ID does not match"); +#endif Types.push_back(DTST); DeducedTemplateSpecializationTypes.InsertNode(DTST, InsertPos); return QualType(DTST, 0); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits