diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-28 18:54:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-28 20:33:58 +0000 |
commit | 0d3738a2580d72b778547bfcdf691fdeb0eccbdd (patch) | |
tree | 4f090456b67ad95f568e041c75db8b5cdcb6a1b7 /compilerplugins/clang/refcounting.cxx | |
parent | 886637d355e77cd61d85279f145c06b07385fecd (diff) |
More Clang 3.4 "(anonymous namespace)" fixes
Change-Id: I7cb43f915565dadd611b90ee30373e472f97efb5
Reviewed-on: https://gerrit.libreoffice.org/26748
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/refcounting.cxx')
-rw-r--r-- | compilerplugins/clang/refcounting.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/compilerplugins/clang/refcounting.cxx b/compilerplugins/clang/refcounting.cxx index 9ce88a370e21..2049eabcb38c 100644 --- a/compilerplugins/clang/refcounting.cxx +++ b/compilerplugins/clang/refcounting.cxx @@ -10,9 +10,9 @@ #include <string> #include <iostream> -#include "plugin.hxx" +#include "check.hxx" #include "compat.hxx" -#include "typecheck.hxx" +#include "plugin.hxx" #include "clang/AST/CXXInheritance.h" /** @@ -110,7 +110,6 @@ bool containsXInterfaceSubclass(const QualType& qType) { } static std::vector<std::string> PROBABLY_GOOD_TEMPLATES = { - "(anonymous namespace)::FindUnoInstanceHint", "abp::OMultiInstanceAutoRegistration", "com::sun::star::uno::Reference", "com::sun::star::uno::WeakReference", @@ -191,6 +190,11 @@ bool containsXInterfaceSubclass(const Type* pType0) { if (pRecordDecl) { const ClassTemplateSpecializationDecl* pTemplate = dyn_cast<ClassTemplateSpecializationDecl>(pRecordDecl); if (pTemplate) { + if (loplugin::DeclCheck(pTemplate).Struct("FindUnoInstanceHint") + .AnonymousNamespace().GlobalNamespace()) + { + return false; + } std::string aName = pTemplate->getQualifiedNameAsString(); if (std::find(PROBABLY_GOOD_TEMPLATES.begin(), PROBABLY_GOOD_TEMPLATES.end(), aName) != PROBABLY_GOOD_TEMPLATES.end()) return false; |