summaryrefslogtreecommitdiff
path: root/idlc/source
AgeCommit message (Collapse)Author
2015-09-28Return unique_ptr from AstExpression::eval_* functionsStephan Bergmann
...generally, idlc leaks most memory, and e.g. trying to turn AstExpression::m_exprValue into a unique_ptr would fail because AstExpression::eval_symbol returns a pointer to an object "owned" elsewhere (but never actually deleted by its owner). So improvement of idlc ends here---for one, it does not improve anything to try and make idlc not leak memory, and for another, idlc is doomed to go away anyway. Change-Id: I36f54130c8bfd1933126ae7f8a982e50d9bc616e
2015-09-28m_exprValue cannot be non-null hereStephan Bergmann
...as, like the other private AstExpression::eval_* functions, eval_un_op is only called from AstExpression::evaluate if m_exprValue is null Change-Id: I812ea249d33a72f95b9692dc72ba6631ffbd4884
2015-09-28AstExpression::coerce always returned m_exprValue, so simplify its signatureStephan Bergmann
Change-Id: I4fa380bc7e8d5b3581468cb0e6417b99587a1e9f
2015-09-28Remove redundant AstExpression::eval_internalStephan Bergmann
Change-Id: I27c067adb2b09ad65a8449f2d88a9cdde149d4be
2015-09-28AstExpression::eval_internal always returns m_exprValueStephan Bergmann
Change-Id: I214fb3d14cef07357860a88fae1652a7d1a282b0
2015-09-28AstExpression::coerce is always called with bAssign = trueStephan Bergmann
Change-Id: I883b8319fde0bd3cc65efe64eb2faf53e2344cfc
2015-09-28Simplify coerce_value signatureStephan Bergmann
Change-Id: I0791600a5cc8600ea80233afba07724dd7f565e1
2015-09-26The only EvalKind actually used is EK_constStephan Bergmann
Change-Id: Ide451d1e287eeb8666b9ddcce312b9a753761c50
2015-08-22tdf#39440 reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: I6ab170c4426494ab9fc53017f88e47fbfdbd9aad Reviewed-on: https://gerrit.libreoffice.org/17920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-07-30loplugin:unusedmethodsNoel Grandin
Change-Id: Ib4d77ee01e7362f5951f81fceeca3c489872d971 Reviewed-on: https://gerrit.libreoffice.org/17378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-06-15remove unnecessary check for null when calling deleteNoel Grandin
Idea originally from caolan. Found using the following command: find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;' Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
2015-05-18idlc: fix warningsStephan Bergmann
Change-Id: I2ef51fae0bc4425c5d2b6707d1df381888b427e7
2015-04-27More loplugin:simplifyboolStephan Bergmann
Change-Id: Iddfa035ac4b41d203ed6864f83dab69dcec33386
2015-04-24loplugin:simplifyboolStephan Bergmann
Change-Id: I858ab62a2659ae122beff1300387aefc3aa64189
2015-04-23Improved loplugin:literaltoboolconversion looking into cond. exprs.Stephan Bergmann
...automatic rewriter fixes Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
2015-04-09convert RTReferenceType to scoped enumNoel Grandin
Change-Id: I8320f6f42d5579fbd09450ddca61c4c066de98e4
2015-04-09convert RTMethodMode to scoped enumNoel Grandin
Change-Id: I81599570698eb92abf14fa6386d8545c2031e863
2015-04-09convert RT_ACCESS fields to scoped enumNoel Grandin
Change-Id: Ifef0aaae6208f18c1352fef7c471deb60a97820d
2015-04-09convert RegError to scoped enumNoel Grandin
Change-Id: I55977c38578cb59deb195d91f8948da2e0905b6a
2015-04-09convert RegValueType to scoped enumNoel Grandin
Change-Id: Ic672e75db4d7323760577b19490ffa28d38965b6
2015-03-29Clean up remaining C-style casts among void pointersStephan Bergmann
Change-Id: I1b49c020d597b569e330482f4dbf20c15ccdae3f
2015-03-28Clean up C-style casts from pointers to voidStephan Bergmann
Change-Id: Iacc2cfe28571d7fffc375ad9b7f3b0da735e093f
2015-03-27loplugin:staticfunctionNoel Grandin
Change-Id: Id796b799f8e2fcc3eae98d43800c5e31fec27fef
2015-03-26const_cast: convert some C-style casts and remove some redundant onesStephan Bergmann
Change-Id: I20cd0d2f3b38fdec90022844de2ac6bdb9978ee7
2015-03-11V668 no sense in testing the result of new against nullCaolán McNamara
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
2015-02-23remove unnecessary parenthesis in return statementsNoel Grandin
found with $ git grep -lP 'return\s*\(\s*\w+\s*\)\s*;' Change-Id: Ic51606877a9edcadeb647c5bf17bc928b69ab60e
2015-01-02boost::unordered_map->std::unordered_mapCaolán McNamara
you can get debug stl this way Change-Id: Ia70a3e7c7c452390e8bee34975d296c9318e4a19
2014-12-18fdo#39440 reduce scope of local variablesMichael Weghorn
This addresses some cppcheck warnings. Change-Id: Ib16e4ecc0e0c43b2c1fb527eb0668a960ae9756e Reviewed-on: https://gerrit.libreoffice.org/13513 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-12-16idlc: Use appropriate OUString functions on string constantsStephan Bergmann
Change-Id: Ia537f5d5d573d24f5bbed7a20b9e9268181faa5f
2014-12-15add link to mkstemp coverity warning wrt threading fiascoCaolán McNamara
Change-Id: Ic8fea32a163ca5e85ac3e2a34d04e4fa1a1943f9
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
2014-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann
This reverts commit 05050cdb23de586870bf479a9df5ced06828d498, not all places that use e.g. OStringToOUString to convert potential UTF-8 are guaranteed to fulfil the prerequisites necessary to use fromUtf8 (and some places like e.g. in codemaker are happy with the best-effort effect of OStringToOUString's OSTRING_TO_OUSTRING_CVTFLAGS).
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin
Change-Id: I771004b7ccab3344a67e827e45bc34c22ffa5f77
2014-11-05markup with event type not checker typeCaolán McNamara
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-11-05fdo#38835 strip out OUString globalsNoel Grandin
they are largely unnecessary these days, since our OUString infrastructure gained optimised handling for static char constants. Change-Id: I07f73484f82d0582252cb4324d4107c998432c37
2014-10-30coverity#982268 silence Copy-paste errorCaolán McNamara
Change-Id: I10e5dd8ea4097892d2571304d982ab20ee230988
2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin
It turns out that almost none of them were necessary. Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83 Reviewed-on: https://gerrit.libreoffice.org/12133 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-28coverity#982167 Unchecked return valueCaolán McNamara
Change-Id: I14c306132a8f12c6f7ecebe5b012984d04bf0d91
2014-10-24coverity#441992 Uncaught exceptionCaolán McNamara
Change-Id: Ibd07b854bbcf9d9e83236669addfd61fe639882a
2014-10-03coverity#982268 Copy-paste errorCaolán McNamara
Change-Id: I68e8e6a564356bae620647b385e16279ff212d32
2014-10-02remove HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY check and macroMichael Stahl
This has been supported by GCC and clang for a very long time. Change-Id: I410a2b39004c932003f8cbefe935aedb109b1163
2014-09-30idlc: std::auto_ptr -> std::unique_ptrStephan Bergmann
Change-Id: I0d64c9b2b7aeddfd70541a14c8a325fea9944c39
2014-09-07create clang plugin to warn about C-style castsNoel Grandin
We don't like C-style casts in our nice C++ code Change-Id: I94e7ec90de9275cd6e20c4146d4f3a74bed93c9d Reviewed-on: https://gerrit.libreoffice.org/10367 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-10Resolves: #i122368# convert inc paths into short form on windows...Jürgen Schmidt
to avoid problem with ucpp (cherry picked from commit 6e370ddd6b532e7bf12df3aa52f93913f4ea8348) Conflicts: idlc/source/options.cxx Change-Id: Ia8c7dc3a9a7df68a483dd106cd47c8624952aeae
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-05-19fix-includes.pl: idlcThomas Arnhold
Change-Id: I62da508151614277d59e831c7506c3ec715348f4
2014-05-13Revert "CID#705985 ensure umask for mkstemp"Stephan Bergmann
This reverts commit 5f5a981dd6df406b7bbddd88fa0b701b5a8d2246. Coverity warning about mkstemp without umask appears to be bogus (cf. <https://communities.coverity.com/message/6516> "Why are uses of mkstemp 'without securely setting umask first' being flagged?) and calling umask is not MT-safe, see fdo#60338 "FILESAVE: Saved files have incorrect permissions on linux."
2014-04-19fixincludeguards.sh: idl and idlcThomas Arnhold
Change-Id: I665e901eb6f65308b8f130da1c6da95bc3255490