We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9adcc63 commit e22a06dCopy full SHA for e22a06d
clang/lib/Sema/SemaDecl.cpp
@@ -8641,9 +8641,9 @@ void Sema::DiagnoseShadowingLambdaDecls(const LambdaScopeInfo *LSI) {
8641
Diag(ShadowedDecl->getLocation(), diag::note_previous_declaration);
8642
} else if (isa<FieldDecl>(ShadowedDecl)) {
8643
if (CXXMethodDecl *MD =
8644
- dyn_cast<CXXMethodDecl>(getFunctionLevelDeclContext()))
8645
- if (MD->isExplicitObjectMemberFunction())
8646
- continue;
+ dyn_cast<CXXMethodDecl>(getFunctionLevelDeclContext());
+ MD && MD->isExplicitObjectMemberFunction())
+ continue;
8647
8648
Diag(Shadow.VD->getLocation(),
8649
LSI->isCXXThisCaptured() ? diag::warn_decl_shadow
0 commit comments