================
@@ -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:
But my question was, what cases are we handling with this check in
`ActOnTypeName`?
I thought 'auto' couldn't appear here.
https://github.com/llvm/llvm-project/pull/98622
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits