[clang] [clang] fix some places where used decls were not marked as referenced (PR #191848)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 13 10:46:18 PDT 2026
================
@@ -3795,6 +3795,10 @@ QualType Sema::CheckTemplateIdType(ElaboratedTypeKeyword Keyword,
/*UpdateArgsWithConversions=*/true))
return QualType();
+ // Diagnose uses of this template.
+ (void)DiagnoseUseOfDecl(Template, TemplateLoc);
+ MarkAnyDeclReferenced(TemplateLoc, Template, /*OdrUse=*/false);
----------------
erichkeane wrote:
Its always been weird to me that we don't have MarkAnyDeclReferenced call DiagnoseUseOfDecl.
But DiagnoseUseOfDecl does a LOT of work that aren't exactly clear to me are what we want in these locations. It causes our argument-deduction diagnostics to happen which seems like a heck of a side-effect.
https://github.com/llvm/llvm-project/pull/191848
More information about the cfe-commits
mailing list