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

Stephan Bergmann sbergman at redhat.com
Tue May 2 13:34:52 UTC 2017


 compilerplugins/clang/checkconfigmacros.cxx |   12 ++++++++++--
 compilerplugins/clang/oslendian.cxx         |    6 +++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 4f6563b50856899eb52648a4d062f5df8d0491ce
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue May 2 15:33:05 2017 +0200

    Adapt to Clang 5 change of PPCallbacks::MacroUndefined signature
    
    ...since <http://llvm.org/viewvc/llvm-project?view=revision&revision=301449>
    "PPCallbacks::MacroUndefined, change signature and add test."
    
    Change-Id: I6a420dc4ca33607fef1356e8869cedee87192e93

diff --git a/compilerplugins/clang/checkconfigmacros.cxx b/compilerplugins/clang/checkconfigmacros.cxx
index 855755999a70..d35008c70c20 100644
--- a/compilerplugins/clang/checkconfigmacros.cxx
+++ b/compilerplugins/clang/checkconfigmacros.cxx
@@ -37,7 +37,11 @@ class CheckConfigMacros
         explicit CheckConfigMacros( const InstantiationData& data );
         virtual void run() override;
         virtual void MacroDefined( const Token& macroToken, const MacroDirective* info ) override;
-        virtual void MacroUndefined( const Token& macroToken, compat::MacroDefinitionParam ) override;
+        virtual void MacroUndefined( const Token& macroToken, compat::MacroDefinitionParam
+#if CLANG_VERSION >= 50000
+            , MacroDirective const *
+#endif
+            ) override;
         virtual void Ifdef( SourceLocation location, const Token& macroToken, compat::MacroDefinitionParam ) override;
         virtual void Ifndef( SourceLocation location, const Token& macroToken, compat::MacroDefinitionParam ) override;
         virtual void Defined( const Token& macroToken, compat::MacroDefinitionParam, SourceRange Range ) override;
@@ -71,7 +75,11 @@ void CheckConfigMacros::MacroDefined( const Token& macroToken, const MacroDirect
         }
     }
 
-void CheckConfigMacros::MacroUndefined( const Token& macroToken, compat::MacroDefinitionParam )
+void CheckConfigMacros::MacroUndefined( const Token& macroToken, compat::MacroDefinitionParam
+#if CLANG_VERSION >= 50000
+                                        , MacroDirective const *
+#endif
+                                        )
     {
     configMacros.erase( macroToken.getIdentifierInfo()->getName());
     }
diff --git a/compilerplugins/clang/oslendian.cxx b/compilerplugins/clang/oslendian.cxx
index 705a7bcc987a..ce71c9cf39e1 100644
--- a/compilerplugins/clang/oslendian.cxx
+++ b/compilerplugins/clang/oslendian.cxx
@@ -59,7 +59,11 @@ private:
     }
 
     void MacroUndefined(
-        Token const & MacroNameTok, compat::MacroDefinitionParam) override
+        Token const & MacroNameTok, compat::MacroDefinitionParam
+#if CLANG_VERSION >= 50000
+        , MacroDirective const *
+#endif
+        ) override
     {
         auto id = MacroNameTok.getIdentifierInfo()->getName();
         if (id == "OSL_BIGENDIAN" || id == "OSL_LITENDIAN") {


More information about the Libreoffice-commits mailing list