[cfe-commits] r143615 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/SemaAccess.cpp lib/Sema/SemaCodeComplete.cpp

Douglas Gregor dgregor at apple.com
Thu Nov 3 10:45:17 PDT 2011


On Nov 3, 2011, at 10:19 AM, David Blaikie wrote:

>> +bool Sema::IsSimplyAccessible(NamedDecl *Decl, DeclContext *Ctx) {
>> +  if (CXXRecordDecl *Class = dyn_cast<CXXRecordDecl>(Ctx)) {
>> +    if (!Class || !Decl->isCXXClassMember())
>> +      return true;
> 
> This is impossible, isn't it? If Class was null you wouldn't have
> entered this conditional to begin with. (& would you need
> dyn_cast_or_null to do that anyway?)


Err, thanks. Fixed my sloppy refactor in r143618.

	- Doug



More information about the cfe-commits mailing list