From 6a1bebcc890c04acdc79236ff54cdd49b27be71a Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 26 Aug 2016 12:36:12 +0200 Subject: Remove wrong check through template args from containsXInterfaceSubclass ...that was probably only there as a workaround for cases (equally wrongly) covered by the check for !hasAnyDependentBase in isDerivedFrom. And the latter appears to no longer be necessary, probably because the cases it happened to cover intentionally are now covered correctly through some other logic that got added to this plugin meanwhile. Change-Id: Ife6370b4f966198fc731813afe62d765450382e6 --- compilerplugins/clang/refcounting.cxx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'compilerplugins/clang/refcounting.cxx') diff --git a/compilerplugins/clang/refcounting.cxx b/compilerplugins/clang/refcounting.cxx index bfdafe91f669..523f0486eafc 100644 --- a/compilerplugins/clang/refcounting.cxx +++ b/compilerplugins/clang/refcounting.cxx @@ -83,10 +83,7 @@ bool isDerivedFrom(const CXXRecordDecl *decl, const char *pString) { if (!decl->hasDefinition()) { return false; } - if (// not sure what hasAnyDependentBases() does, - // but it avoids classes we don't want, e.g. WeakAggComponentImplHelper1 - !decl->hasAnyDependentBases() && - !compat::forallBases( + if (!compat::forallBases( *decl, #if CLANG_VERSION < 30800 BaseCheckNotSubclass, @@ -223,14 +220,6 @@ bool containsXInterfaceSubclass(const Type* pType0) { { return false; } - for(unsigned i=0; igetTemplateArgs().size(); ++i) { - const TemplateArgument& rArg = pTemplate->getTemplateArgs()[i]; - if (rArg.getKind() == TemplateArgument::ArgKind::Type && - containsXInterfaceSubclass(rArg.getAsType())) - { - return true; - } - } } } if (pType->isPointerType()) { -- cgit v1.2.3