Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


...in case anybody can make any sense of what the original bugfix <http://cgit.freedesktop.org/libreoffice/core/commit/?id=5d98ed5c6a4afc0a7943318c510e56aef8c45193> "INTEGRATION: CWS ab12fixes: #118234# SbiExpression::Term(): Allow Input as symbol for action option compatible" actually wanted to achieve, or what "Allow Input as symbol for action option compatible" shall even mean:

On 09/08/2015 10:58 AM, Stephan Bergmann wrote:
commit 4b4a7c0d87eb580272aba0777c9021789025bdc0
Author: Stephan Bergmann <sbergman@redhat.com>
Date:   Tue Sep 8 10:48:43 2015 +0200

     Revert a fix that can never have worked in the first place?

     clang-analyzer-deadcode.DeadStores finds that conditionally assigning

       eTok = SYMBOL

     inside the "if( SbiTokenizer::IsKws( eTok ) )" block is useless, as the directly
     following

       if( DoParametersFollow( pParser, eCurExpr, eTok = eNextTok ) )

     will unconditionally assign into eTok again, without intermediate use of the old
     eTok value.

     Now, the conditional "eTok = SYMBOL" assignment was added as
     5d98ed5c6a4afc0a7943318c510e56aef8c45193 "INTEGRATION: CWS ab12fixes: #118234#
     SbiExpression::Term(): Allow Input as symbol for action option compatible,"
     while the unconditional "eTok = eNextTok" assignment had followed that block
     ever since c25ec0608a167bcf1d891043f02273761c351701 "initial import."

     The referenced "#118234#" was a Sun-internal bug and is no longer available, but
     it does very much look as if this alleged bugfix never worked in the first
     place.  So revert the code back to what it looked before
     5d98ed5c6a4afc0a7943318c510e56aef8c45193, for now.

     Change-Id: I1fe1178d2c5b0c0372da32b8dd0f2dfbdb22a1ae

diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 190822c..8b22257 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -217,15 +217,8 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
      // no keywords allowed from here on!
      if( SbiTokenizer::IsKwd( eTok ) )
      {
-        if( pParser->IsCompatible() && eTok == INPUT )
-        {
-            eTok = SYMBOL;
-        }
-        else
-        {
-            pParser->Error( ERRCODE_BASIC_SYNTAX );
-            bError = true;
-        }
+        pParser->Error( ERRCODE_BASIC_SYNTAX );
+        bError = true;
      }

      if( DoParametersFollow( pParser, eCurExpr, eTok = eNextTok ) )

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.