r294853 - Sema: simplify conditional execution (NFC)
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 11 09:24:05 PST 2017
Author: compnerd
Date: Sat Feb 11 11:24:04 2017
New Revision: 294853
URL: http://llvm.org/viewvc/llvm-project?rev=294853&view=rev
Log:
Sema: simplify conditional execution (NFC)
The conditional cast is unnecessary since we know that it will always
succeed. NFC.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=294853&r1=294852&r2=294853&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sat Feb 11 11:24:04 2017
@@ -3018,10 +3018,7 @@ Sema::ActOnCXXMemberDeclarator(Scope *S,
return nullptr;
}
- // Check for any possible shadowed member variables
- if (const auto *RD = cast<CXXRecordDecl>(CurContext))
- CheckShadowInheritedFields(Loc, Name, RD);
-
+ CheckShadowInheritedFields(Loc, Name, cast<CXXRecordDecl>(CurContext));
} else {
Member = HandleDeclarator(S, D, TemplateParameterLists);
if (!Member)
More information about the cfe-commits
mailing list