Sema: simplify conditional execution (NFC)

The conditional cast is unnecessary since we know that it will always
succeed.  NFC.

llvm-svn: 294853
This commit is contained in:
Saleem Abdulrasool 2017-02-11 17:24:04 +00:00
parent d59fa0e38a
commit b893ed26ec
1 changed files with 1 additions and 4 deletions

View File

@ -3018,10 +3018,7 @@ Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D,
return nullptr; return nullptr;
} }
// Check for any possible shadowed member variables CheckShadowInheritedFields(Loc, Name, cast<CXXRecordDecl>(CurContext));
if (const auto *RD = cast<CXXRecordDecl>(CurContext))
CheckShadowInheritedFields(Loc, Name, RD);
} else { } else {
Member = HandleDeclarator(S, D, TemplateParameterLists); Member = HandleDeclarator(S, D, TemplateParameterLists);
if (!Member) if (!Member)