[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 1 11:32:50 UTC 2019


 compilerplugins/clang/stringconcatauto.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 6d9203b351cf4ef9fa05343f67633a0c633379a4
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Oct 1 10:18:03 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Oct 1 13:32:00 2019 +0200

    Use loplugin::isSamePathname (as needed on Windows)
    
    Change-Id: I8a1df1c64a93dc3e4a6fb00afd11aaf8521ecea4
    Reviewed-on: https://gerrit.libreoffice.org/79926
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/compilerplugins/clang/stringconcatauto.cxx b/compilerplugins/clang/stringconcatauto.cxx
index 7eac4965b3ee..0e708d4f6369 100644
--- a/compilerplugins/clang/stringconcatauto.cxx
+++ b/compilerplugins/clang/stringconcatauto.cxx
@@ -75,11 +75,11 @@ bool StringConcatAuto::checkDecl( const DeclaratorDecl* decl, QualType type, con
     std::string fileName = getFileNameOfSpellingLoc(
         compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(decl)));
     loplugin::normalizeDotDotInFilePath(fileName);
-    if (fileName == SRCDIR "/include/rtl/string.hxx"
-        || fileName == SRCDIR "/include/rtl/ustring.hxx"
-        || fileName == SRCDIR "/include/rtl/strbuf.hxx"
-        || fileName == SRCDIR "/include/rtl/ustrbuf.hxx"
-        || fileName == SRCDIR "/include/rtl/stringconcat.hxx")
+    if (loplugin::isSamePathname(fileName, SRCDIR "/include/rtl/string.hxx")
+        || loplugin::isSamePathname(fileName, SRCDIR "/include/rtl/ustring.hxx")
+        || loplugin::isSamePathname(fileName, SRCDIR "/include/rtl/strbuf.hxx")
+        || loplugin::isSamePathname(fileName, SRCDIR "/include/rtl/ustrbuf.hxx")
+        || loplugin::isSamePathname(fileName, SRCDIR "/include/rtl/stringconcat.hxx"))
         return true;
     auto const tc = loplugin::TypeCheck( type.getNonReferenceType().getCanonicalType());
     const char* typeString = nullptr;


More information about the Libreoffice-commits mailing list