[PATCH] D127638: [clang][sema] Provide better diagnostic for missing template parameters
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 13 12:21:39 PDT 2022
aaron.ballman added a comment.
> Note that the call to isTemplateName() is basically copied from DiagnoseUnknownTypeName() in SemaDecl.cpp. However, just calling that from SemaCXXScopeSpec.cpp as well makes the SemaObjCXX/property-dot-error.mm test fail, because it now outputs
> clang/test/SemaObjCXX/propert-dot-error.mm Line 67: unknown type name 'D'; did you mean 'D'?
> clang/test/SemaObjCXX/propert-dot-error.mm Line 68: unknown type name 'D'; did you mean 'D'?
> and I don't know enough about objc to fix this, but if anyone has some pointers I'd be happy to avoid the code duplication.
Perhaps one way around that is to test `else if (TemplateDecl *TD = Found.getAsSingle<TemplateDecl>()) {}` before calling `DiagnoseUnknownTypeName()`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127638/new/
https://reviews.llvm.org/D127638
More information about the cfe-commits
mailing list