summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/badstatics.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-17 21:50:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-17 21:50:45 +0100
commit6e6c0951870c9b1149755aa21be2ec5d7145f347 (patch)
tree7094ccd90a849ab5e1673ad4b0149aa2828023e6 /compilerplugins/clang/badstatics.cxx
parent27b45cc23c7b8ea8a62e1fc901279fb3f09ae274 (diff)
Fix check for std::weak_ptr (that may be in an inline namespace)
Change-Id: I048aef08df43d07544aafc69b711d258dc40bc21
Diffstat (limited to 'compilerplugins/clang/badstatics.cxx')
-rw-r--r--compilerplugins/clang/badstatics.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx
index 942b331f1749..3b2881f388d5 100644
--- a/compilerplugins/clang/badstatics.cxx
+++ b/compilerplugins/clang/badstatics.cxx
@@ -8,6 +8,7 @@
*/
#include "plugin.hxx"
+#include "typecheck.hxx"
namespace {
@@ -64,7 +65,8 @@ public:
return std::make_pair(false, std::vector<FieldDecl const*>());
}
if ( startsWith(type, "class vcl::DeleteOnDeinit")
- || startsWith(type, "class std::weak_ptr") // not owning
+ || loplugin::TypeCheck(rpType).Class("weak_ptr").StdNamespace()
+ // not owning
|| type == "class ImplWallpaper" // very odd static instance here
|| type == "class Application" // numerous odd subclasses in vclmain::createApplication()
|| type == "class DemoMtfApp" // one of these Application with own VclPtr