/ucpp/

/option> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2017-02-20SAL_DEBUG_TRACE is like SAL_DEBUGTor Lillqvist
Change-Id: I7b4585259255b9869e5f6ec03fc901db29c10bc8 Reviewed-on: https://gerrit.libreoffice.org/34481 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2016-12-19vcl: separate ImplImageTree - ImageTree singleton and public ifaceTomaž Vajngerl
ImplImageTree was used outside of VCL which is not consistent with the name and the header also contains a lot of implementation detail. This separates the implementation to ImplImageTree and the public interface and singleton to ImageTree only. Change-Id: I3a26444f0f6971a6b1d83472e9cef19c93192d3e Reviewed-on: https://gerrit.libreoffice.org/32134 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit bf5f6df9e47bd31dc052c6411f6f88ec2d4e3cea) Reviewed-on: https://gerrit.libreoffice.org/32165
2016-11-22New loplugin:oslendianStephan Bergmann
...to catch new places where defined'ness of OSL_BIG/LITENDIAN would be checked without osl/endian.h being included; cf. e2f08f9def0869460ad38a1c2adb450778290f6e "connectivity, sc: add missing #include <osl/endian.h>" and 2b14fb3a4f92b928f0a5fc536c6a5f4a6e51a9b8 "cppcanvas, oox: add missing #include <osl/endian.h>". Change-Id: I167c8916a01391b7dacad7325153ccf35d3ba9dc
2016-11-22can-be-private analysis needs to ignore virtual methodsNoel Grandin
Change-Id: I1e2f28ed550ff9751912f70e3eec511ddc5b75cf
2016-11-21FieldDecl::getParent fires assert for Objective C @interface membersStephan Bergmann
(like in vcl/inc/osx/a11ywrapper.h's AquaA11yWrapper), at least on recent Clang trunk, from within the call to cast() in cast<RecordDecl>(getDeclContext()) as the decl context apparently is something other than a RecordDecl. Change-Id: I238bae44d6db0f04bf8f90b0032489e3b4822eee
2016-11-21new loplugin datamembershadowNoel Grandin
Change-Id: Ib14319848bafd1fe7e0e663c434bbdeef5e98ecf Reviewed-on: https://gerrit.libreoffice.org/30963 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-17extend unusedfields loplugin to find fields that can be privateNoel Grandin
and apply the results in xmlscript Change-Id: Ib126f6e1576639abfd171e99d9561be9715ece2f
2016-11-16update couple of loplugins for move constructorsNoel Grandin
Change-Id: I82140569a3e09225065d721e4aeac5c5fe93bc45
2016-11-16Reduce noise for irrelevant warnings somewhatStephan Bergmann
...other options to avoid such irrelevant warnings can be to move code to an include file and/or to define a dummy main() accessing otherwise unreferenced entities. Change-Id: Ifd44e376b35ef68496f3aba6a3c046d684824000
2016-11-16new loplugin finalprotectedNoel Grandin
look for final classes, and make sure they don't have protected members Change-Id: I1fa810659bba02b61a5160dbfd8e24185ec9abf4 Reviewed-on: https://gerrit.libreoffice.org/30895 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-15New compilerplugins/clang unit testsStephan Bergmann
...to check that loplugin produces warnings/errors as expected: * Clang has a -verify switch that makes it easy to write test input .cxx files that list in comments all the warnings/errors that are expected, and let Clang check those expectations instead of generating object code. See include/clang/Frontend/VerifyDiagnosticConsumer.h in the Clang source tree for documentation. * Introduce a CompilerTest gbuild class that uses the existing LinkTarget class as much as possible. Checking the input files is implicitly phony, as the compilation step doesn't generate any object files, and the link step does nothing because there is no gb_LinkTarget_set_targettype for CompilerTest. The setup at least works for Clang on Linux (will need adaptions for Clang on Windows; compilers other than Clang are not relevant for now given this is used to check compilerplugins). * Definition of gb_CFLAGS_WERROR in solenv/gbuild/platform/com_GCC_defs.mk needs to be lazy ('=' vs. ':=') so that CompilerTest can override it: The Clang -verify mode wants the input files to specify whether the loplugin diagnostics are warnings or errros, so they consistently need to be errors independent of --enable-werror configuration. * A first (example) test is in compilerplugins/clang/test/salbool.cxx. The corresponding gbuild CompilerTest instance is in solenv/CompilerTest_compilerplugins_clang.mk for now. The reason for that odd split across compilerplugins/ and solenv/ is that there is no compilerplugins/Modules_compilerplugins.mk file, so this setup is the easiest hack for now (to be cleaned up). (Another area that could be improved is that all test files need to be listed explicitly in the CompilerTest_*.mk file, instead of, say, using all .c/.cxx/.m/.mm files in a specified directory.) * The test is run somewhat late during a top-level 'make', after loplugin has already been used in compilation. But it can be run manually (e.g., 'make solenv') when making changes to loplugin during development. Change-Id: I01e12fb84887d264ac03ef2484807458c2075af4
2016-11-14CXXDestructorDecl is already handledStephan Bergmann
...a few lines up, together with CXXConstructorDecl Change-Id: Id9afd4d3936b2efb92de3c6ab950da78d876a5a8
2016-11-14ignore constructors for method-can-be-private analysisNoel Grandin
doesn't work right now Change-Id: I43693104f4af204a6bd0c22b0f7ef53c1a14bb6e
2016-11-14tdf#68118: Pass current document frame to SvxScriptSelectorDialogMike Kaganski
... through MacroChooser Without this, current document's macros library is unavailable in "Assign" dialog Change-Id: I83baa3b98858260eab61e8f4fefde3f9979c6d83 Reviewed-on: https://gerrit.libreoffice.org/30600 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-11-11update vclwidget loplugin to find ref-dropping assigmentNoel Grandin
Look for places where we are accidentally assigning a returned-by-value VclPtr<T> to a T*, which generally ends up in a use-after-free. Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9 Reviewed-on: https://gerrit.libreoffice.org/30749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-08loplugin:oncevarNoel Grandin
Change-Id: I44fb6858eeff14fcbd9fdfbbb0aabd1433b6a27d Reviewed-on: https://gerrit.libreoffice.org/30668 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>