diff options
Diffstat (limited to 'compilerplugins/clang/redundantpointerops.cxx')
-rw-r--r-- | compilerplugins/clang/redundantpointerops.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/compilerplugins/clang/redundantpointerops.cxx b/compilerplugins/clang/redundantpointerops.cxx index 1539588c1e36..7012365aaef3 100644 --- a/compilerplugins/clang/redundantpointerops.cxx +++ b/compilerplugins/clang/redundantpointerops.cxx @@ -178,12 +178,17 @@ bool RedundantPointerOps::isSmartPointerType(const Expr* e) // written is derived from std::unique_ptr or std::shared_ptr for which the get // member function is declared at a base class): auto const tc2 = loplugin::TypeCheck(e->getType()); - if ((tc2.ClassOrStruct("unique_ptr").StdNamespace() + if (tc2.ClassOrStruct("unique_ptr").StdNamespace() || tc2.ClassOrStruct("shared_ptr").StdNamespace() - || (tc2.Class("Reference").Namespace("uno").Namespace("star") - .Namespace("sun").Namespace("com").GlobalNamespace()) + || tc2.Class("Reference").Namespace("uno").Namespace("star") + .Namespace("sun").Namespace("com").GlobalNamespace() || tc2.Class("Reference").Namespace("rtl").GlobalNamespace() - || tc2.Class("SvRef").Namespace("tools").GlobalNamespace())) + || tc2.Class("SvRef").Namespace("tools").GlobalNamespace() + || tc2.Class("WeakReference").Namespace("tools").GlobalNamespace() + || tc2.Class("ScopedReadAccess").Namespace("Bitmap").GlobalNamespace() + || tc2.Class("ScopedVclPtrInstance").GlobalNamespace() + || tc2.Class("VclPtr").GlobalNamespace() + || tc2.Class("ScopedVclPtr").GlobalNamespace()) { return true; } |