summaryrefslogtreecommitdiff
path: root/idlc/test/parser
AgeCommit message (Collapse)Author
2019-08-13Fix Clang 10 -Werror,-Wimplicit-int-float-conversionStephan Bergmann
> idlc/source/astexpression.cxx:330:68: error: implicit conversion from 'sal_Int32' (aka 'int') to 'float' changes value from 2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.fval < SAL_MIN_INT32 || ev->u.fval > SAL_MAX_INT32) > ~ ^~~~~~~~~~~~~ > include/sal/types.h:209:32: note: expanded from macro 'SAL_MAX_INT32' > #define SAL_MAX_INT32 ((sal_Int32) 0x7FFFFFFF) > ^~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:414:58: error: implicit conversion from 'sal_uInt32' (aka 'unsigned int') to 'float' changes value from 4294967295 to 4294967296 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.fval < 0.0 || ev->u.fval > SAL_MAX_UINT32) > ~ ^~~~~~~~~~~~~~ > include/sal/types.h:210:32: note: expanded from macro 'SAL_MAX_UINT32' > #define SAL_MAX_UINT32 ((sal_uInt32) 0xFFFFFFFF) > ^~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:492:68: error: implicit conversion from 'sal_Int64' (aka 'long') to 'float' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.fval < SAL_MIN_INT64 || ev->u.fval > SAL_MAX_INT64) > ~ ^~~~~~~~~~~~~ > include/sal/types.h:212:32: note: expanded from macro 'SAL_MAX_INT64' > #define SAL_MAX_INT64 ((sal_Int64) SAL_CONST_INT64(0x7FFFFFFFFFFFFFFF)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:501:68: error: implicit conversion from 'sal_Int64' (aka 'long') to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.dval < SAL_MIN_INT64 || ev->u.dval > SAL_MAX_INT64) > ~ ^~~~~~~~~~~~~ > include/sal/types.h:212:32: note: expanded from macro 'SAL_MAX_INT64' > #define SAL_MAX_INT64 ((sal_Int64) SAL_CONST_INT64(0x7FFFFFFFFFFFFFFF)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:574:58: error: implicit conversion from 'sal_uInt64' (aka 'unsigned long') to 'float' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.fval < 0.0 || ev->u.fval > SAL_MAX_UINT64) > ~ ^~~~~~~~~~~~~~ > include/sal/types.h:213:32: note: expanded from macro 'SAL_MAX_UINT64' > #define SAL_MAX_UINT64 ((sal_uInt64) SAL_CONST_UINT64(0xFFFFFFFFFFFFFFFF)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > idlc/source/astexpression.cxx:583:58: error: implicit conversion from 'sal_uInt64' (aka 'unsigned long') to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion] > if (ev->u.dval < 0.0 || ev->u.dval > SAL_MAX_UINT64) > ~ ^~~~~~~~~~~~~~ > include/sal/types.h:213:32: note: expanded from macro 'SAL_MAX_UINT64' > #define SAL_MAX_UINT64 ((sal_uInt64) SAL_CONST_UINT64(0xFFFFFFFFFFFFFFFF)) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consitently use the new o3tl::convertsToAtLeast/Most(o3tl::roundAway(...), ...) for all cases in coerce_value that check that a floating-point value falls into an integer range, even those that don't cause a warning. The new idlc/test/parser/conversion.tests is deliberately left out of unoidl/CustomTarget_unoidl-write_test.mk. as unoidl-write doesn't support such conversions from floating-point to integer types. Change-Id: Ie00923e665f2bcb306e1e328614c75b9247512ee Reviewed-on: https://gerrit.libreoffice.org/77353 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2014-02-06Typo: atribute(s) -> attribute(s)Julien Nabet
Change-Id: I5434402e372c4567b2c3f96f5c175618ba3e5cfb
2013-11-26Duplicate base checking code already covers check for opt base != XInterfaceStephan Bergmann
Change-Id: Icd47d87f93641a0b24a96a4be8d3d120f0405f2d
2013-11-25Fix unoidl sourceprovider interface base and member checksStephan Bergmann
...and enable tests shared with idlc Change-Id: I422b16c9b2636835d276cc2085cb640073894c97
2013-11-22Fix unoidl sourceprovider polystruct argument checksStephan Bergmann
Change-Id: Ib7ee3188b87b9b4216214b65347e34970e1b92a5
2013-11-22Fix unoidl sourceprovider "published" checksStephan Bergmann
Change-Id: I93b9fcc2b20ed7a7c160a9ef3294b6e578678f53
2013-11-22constant.tests idlc/unoidl diffs:Stephan Bergmann
* byte only accepts singed literal values < 128 now Change-Id: If557b5212e349fe115948f72b5558fee338db659
2013-11-22attributes.tests idlc/unoidl diffs:Stephan Bergmann
* global exception names no longer clash with local names * repeating the same exception in a raises spec is caught now Change-Id: I388aae4de59bddc1c69bf4c263297d0b92b47106
2013-05-29fdo#60724 change spelling error REMOVEABLE -> REMOVABLE IIThomas Arnhold
Change-Id: I0057b9174af6a83f3fde0e27c3a91a4aeca95873 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2013-04-03Forbid old-style services/singletons inheriting new-style servicesStephan Bergmann
...does not make sense. Adapted some old-style services accordingly, where the inherited service had been changed to new-style after the fact. Change-Id: I5f3e4ddf99160778a319062a6c84f83529ff177b
2013-01-29Clarify that constant groups cannot be typedef'edStephan Bergmann
Change-Id: Ie169ac426d6de107025023dae987cbce6179007f
2013-01-29Clarify that bound attribute can specify getter/setter raises listsStephan Bergmann
Change-Id: I49ffee7c1e65d8e79865e5b596d18111e0c64279
2013-01-29Clarify that attribute setter raises list must not be emptyStephan Bergmann
Change-Id: Ic2d8b1e6f9dbaeee3e3ad9280236abd503de3ffd
2013-01-22API CHANGE: Remove support for individual constants from UNOIDLStephan Bergmann
...i.e., "const X = N;" declarations outside of constant groups. This appears to be unused in practice, and removing it will allow to simplify future code related to UNO type information. This removes the definition of "constant-decl", and the branch mentioning "constant-decl" from the definition of "declaration" at <http://wiki.openoffice.org/w/index.php?title=Documentation/DevGuide/AppendixD/UNOIDL_Syntax_Specification&oldid=137490>. Change-Id: I218626f02ebd46ee438bf5453ca1510c9ed8e5f0
2013-01-22Adapt idlc/test/parser/ to gbuildStephan Bergmann
Change-Id: If57ab37dd4d062e3f6bbf5b75a0cde2524b635bd
2012-07-18re-base on ALv2 code. Includes:Michael Meeks
118568: switch to using ucpp Patch contributed by Juergen Schmidt http://svn.apache.org/viewvc?view=revision&revision=1209396
2012-06-21re-base on ALv2 code.Michael Meeks
Change-Id: Ice06e639213aeb6f7f23cbf4634947dd25613db1
2010-02-12changefileheader2: #i109125#: change source file copyright notice from Sun ↵Jens-Heiner Rechtien
Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision)
2008-04-11INTEGRATION: CWS changefileheader (1.4.50); FILE MERGEDRüdiger Timm
2008/03/31 07:23:53 rt 1.4.50.1: #i87441# Change license header to LPGL v3.
2008-04-11INTEGRATION: CWS changefileheader (1.4.88); FILE MERGEDRüdiger Timm
2008/03/31 07:23:53 rt 1.4.88.1: #i87441# Change license header to LPGL v3.
2008-04-11INTEGRATION: CWS changefileheader (1.6.50); FILE MERGEDRüdiger Timm
2008/03/31 07:23:53 rt 1.6.50.1: #i87441# Change license header to LPGL v3.
2008-04-11INTEGRATION: CWS changefileheader (1.5.40); FILE MERGEDRüdiger Timm
2008/03/31 07:23:53 rt 1.5.40.1: #i87441# Change license header to LPGL v3.
2008-04-11INTEGRATION: CWS changefileheader (1.5.50); FILE MERGEDRüdiger Timm
2008/03/31 07:23:53 rt 1.5.50.1: #i87441# Change license header to LPGL v3.
2008-04-11INTEGRATION: CWS changefileheader (1.6.48); FILE MERGEDRüdiger Timm
2008/03/31 07:23:53 rt 1.6.48.1: #i87441# Change license header to LPGL v3.
2008-04-11INTEGRATION: CWS changefileheader (1.5.66); FILE MERGEDRüdiger Timm
2008/03/31 07:23:53 rt 1.5.66.1: #i87441# Change license header to LPGL v3.
2007-01-25INTEGRATION: CWS ause069 (1.4.46); FILE MERGEDOliver Bolte
2006/12/01 17:37:53 hjs 1.4.46.1: #i70359# remove forced shell calls
2006-12-19INTEGRATION: CWS jl46 (1.4.16); FILE MERGEDIvo Hinkelmann
2006/12/04 17:42:34 jl 1.4.16.2: RESYNC: (1.4-1.5); FILE MERGED 2006/09/15 11:43:06 sb 1.4.16.1: #i69498# AstService::checkLastConstructor failed for differing ctors that happened to have identically typed parameters in one position.
2006-11-06INTEGRATION: CWS jsc14 (1.3.40); FILE MERGEDKurt Zenker
2006/10/25 13:51:07 jsc 1.3.40.1: #i69727# adapt and simplify tests
2006-11-06INTEGRATION: CWS jsc14 (1.5.24); FILE MERGEDKurt Zenker
2006/10/25 13:51:06 jsc 1.5.24.1: #i69727# adapt and simplify tests
2006-11-06INTEGRATION: CWS jsc14 (1.3.40); FILE MERGEDKurt Zenker
2006/10/25 13:51:06 jsc 1.3.40.1: #i69727# adapt and simplify tests
2006-11-06INTEGRATION: CWS jsc14 (1.4.40); FILE MERGEDKurt Zenker
2006/10/25 13:51:06 jsc 1.4.40.1: #i69727# adapt and simplify tests
2006-11-06INTEGRATION: CWS jsc14 (1.4.22); FILE MERGEDKurt Zenker
2006/10/25 13:51:06 jsc 1.4.22.1: #i69727# adapt and simplify tests
2006-06-20INTEGRATION: CWS warnings01 (1.3.14); FILE MERGEDJens-Heiner Rechtien
2005/09/23 00:09:22 sb 1.3.14.2: RESYNC: (1.3-1.4); FILE MERGED 2005/09/13 13:29:04 sb 1.3.14.1: #i53898# Fixed handling of integral literals.
2006-04-19INTEGRATION: CWS sb49 (1.3.20); FILE MERGEDJens-Heiner Rechtien
2006/03/16 10:13:00 sb 1.3.20.2: #i62098# Fixed previous fix (and added a testcase). 2006/03/15 16:21:33 sb 1.3.20.1: #i62098# Added check that no two service ctors have the same signature; along the way, added some helper functions and some missing const qualifiers.
2006-03-09INTEGRATION: CWS jl31 (1.4.18); FILE MERGEDRüdiger Timm
2006/02/20 15:58:28 sb 1.4.18.1: #i62339# Forbid any unsigned types (i.e., not just UNSIGNED SHORT/LONG/HYPER, but also sequences of such) as type arguments of instantiated polymorphic struct types.
2005-09-07INTEGRATION: CWS ooo19126 (1.2.34); FILE MERGEDRüdiger Timm
2005/09/05 17:39:48 rt 1.2.34.1: #i54170# Change license header: remove SISSL
2005-09-07INTEGRATION: CWS ooo19126 (1.3.20); FILE MERGEDRüdiger Timm
2005/09/05 17:39:47 rt 1.3.20.1: #i54170# Change license header: remove SISSL
2005-09-07INTEGRATION: CWS ooo19126 (1.2.34); FILE MERGEDRüdiger Timm
2005/09/05 17:39:47 rt 1.2.34.1: #i54170# Change license header: remove SISSL
2005-09-07INTEGRATION: CWS ooo19126 (1.2.44); FILE MERGEDRüdiger Timm
2005/09/05 17:39:47 rt 1.2.44.1: #i54170# Change license header: remove SISSL
2005-09-07INTEGRATION: CWS ooo19126 (1.3.34); FILE MERGEDRüdiger Timm
2005/09/05 17:39:47 rt 1.3.34.1: #i54170# Change license header: remove SISSL
2005-09-07INTEGRATION: CWS ooo19126 (1.3.34); FILE MERGEDRüdiger Timm
2005/09/05 17:39:46 rt 1.3.34.1: #i54170# Change license header: remove SISSL
2005-09-07INTEGRATION: CWS ooo19126 (1.2.44); FILE MERGEDRüdiger Timm
2005/09/05 17:39:46 rt 1.2.44.1: #i54170# Change license header: remove SISSL
2005-09-07INTEGRATION: CWS ooo19126 (1.3.16); FILE MERGEDRüdiger Timm
2005/09/05 17:39:46 rt 1.3.16.1: #i54170# Change license header: remove SISSL
2005-01-18INTEGRATION: CWS sb28 (1.2.22); FILE MERGEDKurt Zenker
2005/01/03 16:38:01 sb 1.2.22.1: #i28722# Removed support for char and string constants.
2004-08-20INTEGRATION: CWS sb21 (1.2.16); FILE MERGEDRüdiger Timm
2004/08/05 13:21:38 sb 1.2.16.1: #i31370# Better detect recursive uses of polymorphic struct types.
2004-08-20INTEGRATION: CWS sb21 (1.2.16); FILE MERGEDRüdiger Timm
2004/08/05 15:13:26 sb 1.2.16.2: #i32158# Using an unsigned integer type as a type argument is now an error. 2004/08/05 13:21:38 sb 1.2.16.1: #i31370# Better detect recursive uses of polymorphic struct types.
2004-06-03INTEGRATION: CWS sb18 (1.1.2); FILE ADDEDOliver Bolte
2004/04/14 08:52:32 sb 1.1.2.2: #i21150# Added support for polymorphic struct types. 2004/04/08 14:38:20 sb 1.1.2.1: #i21150# Fixed UNOIDL typedef support; initial support for polymorphic struct types.
2004-06-03INTEGRATION: CWS sb18 (1.1.2); FILE ADDEDOliver Bolte
2004/04/14 11:56:59 sb 1.1.2.2: #i21150# A struct type S cannot have members of type S. 2004/04/14 08:52:52 sb 1.1.2.1: #i21150# Added support for polymorphic struct types.
2004-06-03INTEGRATION: CWS sb18 (1.1.2); FILE ADDEDOliver Bolte
2004/05/19 08:56:09 sb 1.1.2.2: #i21150# Check that an unpublished entity is not used in the declaration of a published entity. 2004/05/19 06:44:00 sb 1.1.2.1: #i21150# Added new feature: published.
2004-06-03INTEGRATION: CWS sb18 (1.1.2); FILE ADDEDOliver Bolte
2004/04/26 12:17:43 sb 1.1.2.4: #i21150# Forbid polymorphic struct type templates with base types. 2004/04/14 11:56:59 sb 1.1.2.3: #i21150# A struct type S cannot have members of type S. 2004/04/14 08:52:31 sb 1.1.2.2: #i21150# Added support for polymorphic struct types. 2004/04/08 14:38:30 sb 1.1.2.1: #i21150# Fixed UNOIDL typedef support; initial support for polymorphic struct types.