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

Stephan Bergmann sbergman at redhat.com
Fri Sep 29 06:33:01 UTC 2017


 compilerplugins/clang/reservedid.cxx |   53 +++++++++++++++++++++++++++++++++--
 1 file changed, 50 insertions(+), 3 deletions(-)

New commits:
commit ce9a41dc387966c74c1af92783a97565b5af3668
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Sep 29 08:32:36 2017 +0200

    Adapt loplugin:reservedid to Windows
    
    Change-Id: I41ccccd7ad77bc4ecf2ff7fcd9496af656ad952e

diff --git a/compilerplugins/clang/reservedid.cxx b/compilerplugins/clang/reservedid.cxx
index 50c1fe10eb02..d7468be463be 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -62,11 +62,40 @@ void ReservedId::run() {
         auto & prep = compiler.getPreprocessor();
         for (auto const & m: prep.macros(false)) {
             auto id = m.first->getName();
-            if (determineKind(id) != Kind::Ok && id != "_GLIBCXX_CDTOR_CALLABI"
+            if (determineKind(id) != Kind::Ok
+                && id != "_ATL_APARTMENT_THREADED"
+                    // extensions/source/activex/StdAfx2.h
+                && id != "_ATL_STATIC_REGISTRY"
+                    // extensions/source/activex/StdAfx2.h
+                && id != "_GLIBCXX_CDTOR_CALLABI"
+                && id != "_MAX_PATH" // Windows
                 && id != "_POSIX_SOURCE"
+                && id != "_USE_MATH_DEFINES" // include/sal/config.h, Windows
+                && id != "_WIN32_DCOM" // embedserv/source/embed/esdll.cxx
+                && id != "_WTL_NO_CSTRING"
+                    // fpicker/source/win32/filepicker/platform_vista.h (TODO:
+                    // needed?)
                 && id != "__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES"
-                && id != "__ORCUS_STATIC_LIB" && id != "__USE_GNU"
-                && id != "_MAX_PATH") //TODO: win32
+                && id != "__Column_FWD_DEFINED__"
+                    // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK
+                    // adoctint.h
+                && id != "__Group_FWD_DEFINED__"
+                    // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK
+                    // adoctint.h
+                && id != "__Index_FWD_DEFINED__"
+                    // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK
+                    // adoctint.h
+                && id != "__Key_FWD_DEFINED__"
+                    // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK
+                    // adoctint.h
+                && id != "__ORCUS_STATIC_LIB"
+                && id != "__Table_FWD_DEFINED__"
+                    // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK
+                    // adoctint.h
+                && id != "__USE_GNU"
+                && id != "__User_FWD_DEFINED__")
+                    // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK
+                    // adoctint.h
             {
                 auto d = prep.getLocalMacroDirectiveHistory(m.first);
                 for (;;) {
@@ -130,10 +159,13 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) {
                 // xmlsecurity/source/xmlsec/nss/nssrenam.h
             && s != "__CTFont"
                 // vcl/source/window/cairo_cairo.cxx -> include/vcl/sysdata.hxx
+            && s != "__CxxDetectRethrow"
+                // bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
             && s != "__GLXcontextRec" // vcl/unx/glxtest.cxx
             && s != "__GLXFBConfigRec" // vcl/unx/glxtest.cxx
             && s != "__PK11_GetKeyData"
                 // xmlsecurity/source/xmlsec/nss/nssrenam.h
+            && s != "__current_exception" // bridges/inc/except.hxx, Windows
             && s != "__data_start" // sal/osl/unx/system.cxx
             && s != "__lxstat64" // setup_native/scripts/source/getuid.c
             && s != "__lxstat") // setup_native/scripts/source/getuid.c
@@ -148,6 +180,20 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) {
         break;
     case Kind::UnderscoreUppercase:
         if (!isApi(decl)
+            && s != "_ADOColumn"
+                // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
+            && s != "_ADOGroup"
+                // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
+            && s != "_ADOIndex"
+                // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
+            && s != "_ADOKey"
+                // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
+            && s != "_ADOTable"
+                // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
+            && s != "_ADOUser"
+                // connectivity/source/inc/ado/Awrapadox.hxx, MS SDK adoctint.h
+            && s != "_DllMainCRTStartup"
+                // odk/source/unowinreg/win/unowinreg.cxx (TODO: needed?)
             && s != "_FcPattern" // vcl/inc/unx/fc_fontoptions.hxx
             && s != "_GdkDisplay"
                 // vcl/unx/gtk/xid_fullscreen_on_all_monitors.c
@@ -157,6 +203,7 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) {
                 // vcl/unx/gtk/xid_fullscreen_on_all_monitors.c
             && s != "_GstVideoOverlay"
                 // avmedia/source/gstreamer/gstplayer.hxx
+            && s != "_Module" // extensions/source/activex/StdAfx2.h, CComModule
             && s != "_XRegion" // vcl/unx/generic/gdi/x11cairotextrender.cxx
             && s != "_XTrap") // vcl/unx/generic/gdi/xrender_peer.hxx
         {


More information about the Libreoffice-commits mailing list