[PATCH] change

Chris Sherlock (via Code Review) gerrit at gerrit.libreoffice.org
Wed May 1 09:09:13 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3725

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/25/3725/1

change

Change-Id: If35aad02bfdca012542d552b7f4ec0f3042e757a
---
M compilerplugins/clang/checkconfigmacros.cxx
M compilerplugins/clang/literalalternative.cxx
M compilerplugins/clang/sallogareas.cxx
3 files changed, 4 insertions(+), 2 deletions(-)



diff --git a/compilerplugins/clang/checkconfigmacros.cxx b/compilerplugins/clang/checkconfigmacros.cxx
index 3ffaff8..06ecd81 100644
--- a/compilerplugins/clang/checkconfigmacros.cxx
+++ b/compilerplugins/clang/checkconfigmacros.cxx
@@ -34,7 +34,9 @@
         virtual void run();
         virtual void MacroDefined( const Token& macroToken, const MacroInfo* info );
         virtual void MacroUndefined( const Token& macroToken , const MacroInfo* info );
+        virtual void Ifdef( const Token& /* macroToken */ ) { };
         virtual void Ifdef( SourceLocation location, const Token& macroToken );
+        virtual void Ifndef( const Token& /* macroToken */ ) { };
         virtual void Ifndef( SourceLocation location, const Token& macroToken );
         virtual void Defined( const Token& macroToken );
     private:
diff --git a/compilerplugins/clang/literalalternative.cxx b/compilerplugins/clang/literalalternative.cxx
index 06ba803..6586b17 100644
--- a/compilerplugins/clang/literalalternative.cxx
+++ b/compilerplugins/clang/literalalternative.cxx
@@ -70,7 +70,7 @@
             StringLiteral const * lit = dyn_cast<StringLiteral>(arg0);
             bool match = false;
             if (lit != nullptr) {
-                match = res == lit->getLength();
+                match = res == lit->getByteLength();
             } else {
                 UnaryOperator const * op = dyn_cast<UnaryOperator>(arg0);
                 if (op != nullptr && op->getOpcode() == UO_AddrOf) {
diff --git a/compilerplugins/clang/sallogareas.cxx b/compilerplugins/clang/sallogareas.cxx
index 0724ca7..dbc8828 100644
--- a/compilerplugins/clang/sallogareas.cxx
+++ b/compilerplugins/clang/sallogareas.cxx
@@ -66,7 +66,7 @@
                 if( const StringLiteral* area = dyn_cast< StringLiteral >( call->getArg( 1 )->IgnoreParenImpCasts()))
                     {
                     if( area->getKind() == StringLiteral::Ascii )
-                        checkArea( area->getBytes(), area->getExprLoc());
+                        checkArea( area->getString(), area->getExprLoc());
                     else
                         report( DiagnosticsEngine::Warning, "unsupported string literal kind (plugin needs fixing?)",
                             area->getLocStart());

-- 
To view, visit https://gerrit.libreoffice.org/3725
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If35aad02bfdca012542d552b7f4ec0f3042e757a
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Chris Sherlock <chris.sherlock79 at gmail.com>



More information about the LibreOffice mailing list