[PATCH] D140828: [C++] Implement "Deducing this" (P0847R7)
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 10 09:38:34 PDT 2023
aaron.ballman added inline comments.
================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:18171
+bool Sema::CheckOverridingExplicitObjectMembers(CXXMethodDecl *New,
+ const CXXMethodDecl *Old) {
----------------
cor3ntin wrote:
> aaron.ballman wrote:
> > This function name feels off to me; would it make more sense as `DiagnoseExplicitObjectOverride()` or something along those lines? It's not really doing a general check, just checking one specific property.
> I don't disagree but it is consistent with other function in the vicinity
>
> CheckOverridingFunctionAttributes
> CheckOverridingFunctionReturnType
> CheckPureMethod
>
>
Okay, then how about `CheckExplicitObjectOverride`?
================
Comment at: clang/lib/Sema/SemaLambda.cpp:393-394
+ CXXRecordDecl *RD = Method->getParent();
+ if (Method->isDependentContext())
+ return;
+ if (RD->getLambdaCaptureDefault() == LambdaCaptureDefault::LCD_None &&
----------------
cor3ntin wrote:
> aaron.ballman wrote:
> > Do we care that the method is a dependent context? I thought we'd be checking if the method itself is dependent?
> How would you do that through its type?
`Method->getType()->isDependentType()` should suffice, no?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140828/new/
https://reviews.llvm.org/D140828
More information about the cfe-commits
mailing list