================ @@ -6308,11 +6308,11 @@ TypeResult Sema::ActOnTypeName(Declarator &D) { CheckExtraCXXDefaultArguments(D); } - if (const AutoType *AutoT = T->getAs<AutoType>()) - CheckConstrainedAuto( - AutoT, - TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc()); - + if (const AutoType *AutoT = T->getAs<AutoType>()) { + AutoTypeLoc Loc = TInfo->getTypeLoc().getContainedAutoTypeLoc(); + CheckConstrainedAuto(AutoT, + Loc ? Loc.getConceptNameLoc() : SourceLocation()); + } ---------------- mizvekov wrote:
These still have the same issue, but I don't understand why we need this check here. We obviously can't write stuff like ```C++ using X = auto; ``` So I am missing in what case undeduced auto can appear here, except the weird deleted function error recovery issue. https://github.com/llvm/llvm-project/pull/98622 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits