summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/unusedmethods.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-17 13:08:16 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-07-20 06:33:44 +0000
commit9f4f237a3834e5d58a87296424db5428f68d1550 (patch)
tree9e3e2fa55dc1a4d673d4c12e2af297bf32140204 /compilerplugins/clang/unusedmethods.cxx
parentfcdddbd30a8b5cf6a5cc4d2ff28b7d4a20f8ec6b (diff)
loplugin:unusedmethods svl
Change-Id: If86cc43fda4d138cf7f678d81fa2b35f68f3c03b Reviewed-on: https://gerrit.libreoffice.org/17162 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'compilerplugins/clang/unusedmethods.cxx')
-rw-r--r--compilerplugins/clang/unusedmethods.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index a137a216cfc6..6627fe90a0cc 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -124,12 +124,19 @@ static bool startsWith(const std::string& s, const char* other)
return s.compare(0, strlen(other), other) == 0;
}
-static bool isStandardStuff(const std::string& s)
+static bool isStandardStuff(const std::string& input)
{
+ std::string s = input;
+ if (startsWith(s,"class "))
+ s = s.substr(6);
+ else if (startsWith(s,"struct "))
+ s = s.substr(7);
// ignore UNO interface definitions, cannot change those
return startsWith(s, "com::sun::star::")
// ignore stuff in the C++ stdlib and boost
|| startsWith(s, "std::") || startsWith(s, "boost::") || startsWith(s, "class boost::") || startsWith(s, "__gnu_debug::")
+ // external library
+ || startsWith(s, "mdds::")
// can't change our rtl layer
|| startsWith(s, "rtl::")
// ignore anonymous namespace stuff, it is compilation-unit-local and the compiler will detect any