[PATCH] D149516: [Sema] `setInvalidDecl` for error deduction declaration
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 22 14:07:40 PDT 2023
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from a request for a comment.
================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:11196
if (D.isFunctionDefinition())
Diag(D.getIdentifierLoc(), diag::err_deduction_guide_defines_function);
+ return IsValid;
----------------
HerrCai0907 wrote:
> rsmith wrote:
> > Should we return that we had an error after this one too?
> if `D.isFunctionDefinition()`, we can still create valid deduction guide. I think keeping it can avoid lots of meaningless error later.
I think it's worth leaving that as a comment in the code so folks know it's done on purpose and why.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149516/new/
https://reviews.llvm.org/D149516
More information about the cfe-commits
mailing list