================ @@ -7416,10 +7416,11 @@ NamedDecl *Sema::ActOnVariableDeclarator( tryToFixVariablyModifiedVarType(TInfo, R, D.getIdentifierLoc(), /*DiagID=*/0); - if (const AutoType *AutoT = R->getAs<AutoType>()) - CheckConstrainedAuto( - AutoT, - TInfo->getTypeLoc().getContainedAutoTypeLoc().getConceptNameLoc()); + if (const AutoType *AutoT = R->getAs<AutoType>()) { + AutoTypeLoc Loc = TInfo->getTypeLoc().getContainedAutoTypeLoc(); ---------------- Endilll wrote:
This makes more sense now. > A TypeLoc is not just a SourceLocation, it's a QualType with source locations. I though that `QualType` with source locations is `TypeSourceInfo`. If I correctly understand description of `TypeLoc` correctly, `TypeLoc` is trailing data of `TypeSourceInfo`. Is that correct? > As an aside, if all you need to do is mark the concepts as used, you might as > well do that earlier when the AutoType is formed, for example around the > calls to ASTContext::getAutoType in SemaType.cpp / ConvertDeclSpecToType. Calling `DiagnoseUseOfDecl` there seems too early. It triggers on _declaration_ of deprecated concept. 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