Add warning for c++ member variable shadowing
Jonathan Roelofs via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 7 13:09:25 PST 2017
On 1/24/17 8:10 PM, Saleem Abdulrasool via cfe-commits wrote:
> Don't use the cast for the check, use isa. Although, since you use the
> value later, it is probably better to write this as:
>
> if (const auto *RD = cast<CXXRecordDecl>(CurContext))
> CheckShadowInheritedVariabless(Loc, Name.getAsString(), RD, RD);
@compnerd: s/cast/dyn_cast/ or s/cast/dyn_cast_or_null/, right?
Jon
--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded
More information about the cfe-commits
mailing list