[clang] Bugfix for chosing the correct deduction guide (PR #66487)

via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 05:09:09 PDT 2023


================
@@ -2129,7 +2129,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(
     Function = CXXDeductionGuideDecl::Create(
         SemaRef.Context, DC, D->getInnerLocStart(),
         InstantiatedExplicitSpecifier, NameInfo, T, TInfo,
-        D->getSourceRange().getEnd(), /*Ctor=*/nullptr,
+        D->getSourceRange().getEnd(), DGuide->getCorrespondingConstructor(),
----------------
HoBoIs wrote:

I'm a new developer, can someone with more experience in clang check if this can never cause a use after free.

https://github.com/llvm/llvm-project/pull/66487


More information about the cfe-commits mailing list