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

David Blaikie dblaikie at gmail.com
Thu Nov 3 10:19:50 PDT 2011


> +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?)

- David




More information about the cfe-commits mailing list