summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/staticmethods.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-05-18 09:56:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-05-18 09:56:01 +0200
commitdf8d092c3a3c65bc23bc3c1da281cc4cb10a1e3d (patch)
treeea5daefc9c1665ab14aeeedc0de4298c7c85a8b1 /compilerplugins/clang/staticmethods.cxx
parent33cbc99fea5a3e4b87e883fd60ec97d4503109f3 (diff)
Adapt pathname checks to mixed usage of \ and / on Windows
Change-Id: I91bc89a9076c6642e06b238f65f2d31a1d20c6b5
Diffstat (limited to 'compilerplugins/clang/staticmethods.cxx')
-rw-r--r--compilerplugins/clang/staticmethods.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/compilerplugins/clang/staticmethods.cxx b/compilerplugins/clang/staticmethods.cxx
index f33f10f907c7..d0dd43eb40ee 100644
--- a/compilerplugins/clang/staticmethods.cxx
+++ b/compilerplugins/clang/staticmethods.cxx
@@ -99,12 +99,12 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl)
return true;
}
// don't mess with the backwards compatibility stuff
- if (getFilename(pCXXMethodDecl->getLocStart()) == SRCDIR "/cppuhelper/source/compat.cxx") {
+ if (loplugin::isSamePathname(getFilename(pCXXMethodDecl->getLocStart()), SRCDIR "/cppuhelper/source/compat.cxx")) {
return true;
}
// the DDE has a dummy implementation on Linux and a real one on Windows
std::string aFilename = getFilename(pCXXMethodDecl->getCanonicalDecl()->getLocStart());
- if (aFilename == SRCDIR "/include/svl/svdde.hxx") {
+ if (loplugin::isSamePathname(aFilename, SRCDIR "/include/svl/svdde.hxx")) {
return true;
}
auto cdc = loplugin::DeclCheck(pCXXMethodDecl->getParent());
@@ -124,17 +124,17 @@ bool StaticMethods::TraverseCXXMethodDecl(const CXXMethodDecl * pCXXMethodDecl)
return true;
}
// the unotools and svl config code stuff is doing weird stuff with a reference-counted statically allocated pImpl class
- if (startsWith(aFilename, SRCDIR "/include/unotools")) {
+ if (loplugin::hasPathnamePrefix(aFilename, SRCDIR "/include/unotools")) {
return true;
}
- if (startsWith(aFilename, SRCDIR "/include/svl")) {
+ if (loplugin::hasPathnamePrefix(aFilename, SRCDIR "/include/svl")) {
return true;
}
- if (startsWith(aFilename, SRCDIR "/include/framework") || startsWith(aFilename, SRCDIR "/framework")) {
+ if (loplugin::hasPathnamePrefix(aFilename, SRCDIR "/include/framework") || loplugin::hasPathnamePrefix(aFilename, SRCDIR "/framework")) {
return true;
}
// there is some odd stuff happening here I don't fully understand, leave it for now
- if (startsWith(aFilename, SRCDIR "/include/canvas") || startsWith(aFilename, SRCDIR "/canvas")) {
+ if (loplugin::hasPathnamePrefix(aFilename, SRCDIR "/include/canvas") || loplugin::hasPathnamePrefix(aFilename, SRCDIR "/canvas")) {
return true;
}
// classes that have static data and some kind of weird reference-counting trick in its constructor