summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/refcounting.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-08-26 12:36:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-08-26 12:36:12 +0200
commit6a1bebcc890c04acdc79236ff54cdd49b27be71a (patch)
tree12cb6d3f86c380e5fb0dd6b66c2dcc286935cbf2 /compilerplugins/clang/refcounting.cxx
parente3e66f7b07a920132c17a57e5434d0a472c6a250 (diff)
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
Diffstat (limited to 'compilerplugins/clang/refcounting.cxx')
-rw-r--r--compilerplugins/clang/refcounting.cxx13
1 files changed, 1 insertions, 12 deletions
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; i<pTemplate->getTemplateArgs().size(); ++i) {
- const TemplateArgument& rArg = pTemplate->getTemplateArgs()[i];
- if (rArg.getKind() == TemplateArgument::ArgKind::Type &&
- containsXInterfaceSubclass(rArg.getAsType()))
- {
- return true;
- }
- }
}
}
if (pType->isPointerType()) {