summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/oncevar.cxx
AgeCommit message (Collapse)Author
2018-02-26loplugin:oncevar extend to tools/gen.hxx typesNoel Grandin
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2 Reviewed-on: https://gerrit.libreoffice.org/50283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-07Clean away temporarily added using declarationsStephan Bergmann
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
2017-08-17display oncevar loplugin by defaultNoel Grandin
seems to be annoying some people. I'll run this one myself, and at some stage create some code for enabling a subset of extra plugins via configure.ac Change-Id: Ia95701f63f65751d75b5a3fecffb1fc1a82f38e0
2017-07-31loplugin:oncevarNoel Grandin
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-22make oncevar plugin ignore methods with #ifdef-eryNoel Grandin
Change-Id: I8a9cf2c4b81b95bf654f7e90306328d72e3d3408 Reviewed-on: https://gerrit.libreoffice.org/40280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14loplugin:oncevar: empty stringsStephan Bergmann
...which showed that checking the parent statement (which may be too large to) in OnceVar::VisitDeclRefExpr is inadequate. Change-Id: I07fb8ba9e2dfbd0c65a2723737d14abcddcefec4 Reviewed-on: https://gerrit.libreoffice.org/39757 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-13loplugin:oncevar for value-dependent constant expressionsStephan Bergmann
(Where the change to basic/source/comp/codegen.cxx reveals that loplugin:loopvartoosmall also needs the Clang < 3.9 workaround from 33ee8e61292af05627f5f72ea2f93ad80e715e46 "Work around bug in Clang 3.8".) Change-Id: I9f23b9648bc11ca4136a0fbdd332570ba70ee77c Reviewed-on: https://gerrit.libreoffice.org/39667 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-04typo in commentStephan Bergmann
Change-Id: I816f2dad87d798296e60a5eb8842a147f504b90b
2017-07-03Work around bug in Clang 3.8Stephan Bergmann
...that causes > clang/lib/AST/Type.cpp:1878: bool clang::Type::isConstantSizeType() const: Assertion `!isDependentType() && "This doesn't make sense for dependent types"' failed. compilation failure in PCodeBufferWalker in basic/source/comp/codegen.cxx > static T readParam( sal_uInt8 const *& pCode ) > { > short nBytes = sizeof( T ); > T nOp1=0; > for ( int i=0; i<nBytes; ++i ) > nOp1 |= *pCode++ << ( i * 8); > return nOp1; > } with loplugin:oncevar. Change-Id: I25417076549ea538adf013282f3657e0d642d776
2017-06-29loplugin:oncevar variousNoel Grandin
Change-Id: I8b82d46d4688b1a59d6fe1b05da7d5c8dfc13ca6 Reviewed-on: https://gerrit.libreoffice.org/38766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-20-Werror=unused-functionStephan Bergmann
Change-Id: Iecc7d68ad18e90bf84d358af92194c230efc2671
2017-06-20improve oncevar lopluginNoel Grandin
we look for any kind of scalar variable now that deserves to be inlined, and we check for variables that cannot be inlined because they are being passed by reference, or modified, or have their address taken Change-Id: Ia744a180e91d1516140a1555d4514f6fa4de1c0b Reviewed-on: https://gerrit.libreoffice.org/38966 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-06-23compilerplugins: move oncevar into storeMiklos Vajna
As suggested by Stephan and agreed by Noel -- as its warnings are not useful in all cases. Change-Id: I3c6034ae9d3c74aeb089a67dc48c1f91a3ea3a21
2016-04-27cppcheck: silence warnings in compilerpluginsJochen Nitschke
mostly missing explicit before ctors and uninitialized member vars one odd use of std::find > compilerplugins/clang/implicitboolconversion.cxx > 800 stlIfFind warning Suspicious condition. > The result of find() is an iterator, but it is not properly checked. Change-Id: Iade53494cd7fe8ddb0e110e431449ae5a517fe3b Reviewed-on: https://gerrit.libreoffice.org/24398 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-09new loplugin: oncevarNoel Grandin
Change-Id: If57390510dde4d166be3141b9f658a7453755d3f Reviewed-on: https://gerrit.libreoffice.org/19815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>