Age | Commit message (Collapse) | Author |
|
Change-Id: I938deef90c8d6ceb0e72ab3f6ee2cbddc6f72b8d
Reviewed-on: https://gerrit.libreoffice.org/47730
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia72b65577143623cedc7a40bc34f7fb897add097
Reviewed-on: https://gerrit.libreoffice.org/47726
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
update plugin to find all places where we are unconditionally deleting
stuff in a destructor
Change-Id: Ia0fedc2420c7717ed2bdd8d3bb00262d2a63e0bc
Reviewed-on: https://gerrit.libreoffice.org/47724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(The comment what the test wants to check quotes noelgrandin on #libreoffice-
dev.)
Change-Id: I8e8980902c8113eb75d24064e68a47e70bc483d6
Reviewed-on: https://gerrit.libreoffice.org/47676
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...due to missing sys/file.h
Change-Id: I7cfd64c5355d9fdbb85320f876c277a408be9352
Reviewed-on: https://gerrit.libreoffice.org/47675
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
It looks like the main point of these being globals is so that they can
be cleared from various places when tables or table frames are destroyed.
Add a SwDoc parameter to ClearFEShellTabCols() and just iterate
over all shells.
Change-Id: I75ad6b695ee1bfa76b9a05c606b07a3574c70ac4
|
|
fix the ReturnStmt check
Change-Id: I95076076bd1313d23798c4615ea12910c86ed9a8
Reviewed-on: https://gerrit.libreoffice.org/47309
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Id1e7fbecd9e9f816553d2e678c3f1b7890fc4db8
Reviewed-on: https://gerrit.libreoffice.org/47293
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
slightly less restrictive check when calling functions
Change-Id: I35e268ac611797b1daa83777cda02288a635aa32
Reviewed-on: https://gerrit.libreoffice.org/47259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4b6ea89ae2072f4389a696ea3c96d8f7a5731e7a
Reviewed-on: https://gerrit.libreoffice.org/47246
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4484ac461761e4c46364b4f473c7e62f8ec72103
Reviewed-on: https://gerrit.libreoffice.org/47243
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I237936d62d0f1b17574dd88b5c9de932dc03238e
Reviewed-on: https://gerrit.libreoffice.org/47214
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...as finding uses of variables in arguments to expand-to-nothing assert macros
is just not implemented not implemented.
Change-Id: Iacb3bd25d03eca13ac8ff3942f98e46dee3286b9
Reviewed-on: https://gerrit.libreoffice.org/47200
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I61b908999be7d94eed0c421125f8e1fc07e3c2db
Reviewed-on: https://gerrit.libreoffice.org/47182
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8128aa4b5fc60efd1dbf5971cdde11e588f5f64b
Reviewed-on: https://gerrit.libreoffice.org/47167
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7161dfca77f944027bd20614616e22d6acfa27cd
Reviewed-on: https://gerrit.libreoffice.org/47081
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and for now, ignore methods with params so we don't fall into the trap
of thinking that calls to methods like:
Bar& foo(Bar &p) { return p; }
can be converted from
Bar f() { return foo(Bar()); }
to
Bar const & f() { return foo(Bar()); }
Change-Id: Ia3795eb2baf353cb6bec4ebf40451f2789d66ad7
Reviewed-on: https://gerrit.libreoffice.org/47034
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2a752025cd429e4d271626402dce5d8a8b0c76d2
Reviewed-on: https://gerrit.libreoffice.org/47021
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...after 2a1fb4401da16f6a18c0bd05fe4b460a3048f9b5 "loplugin:passstuffbyref
improved returns", where compiling as C++17 causes a false positive for
S2::set1, whose return statement consists of
> `-ReturnStmt 0x9ef8d78 <col:23, col:44>
> `-ExprWithCleanups 0x9ef8d60 <col:30, col:44> 'class rtl::OUString'
> `-CXXFunctionalCastExpr 0x9ef8d38 <col:30, col:44> 'class rtl::OUString' functional cast to class rtl::OUString <ConstructorConversion>
> `-CXXBindTemporaryExpr 0x9ef8d18 <col:30, col:44> 'class rtl::OUString' (CXXTemporary 0x9ef8d10)
> `-CXXConstructExpr 0x9ef8cd0 <col:30, col:44> 'class rtl::OUString' 'void (char const &[4], typename libreoffice_internal::ConstCharArrayDetector<char const[4], libreoffice_internal::Dummy>::Type)'
> |-StringLiteral 0x9ef7160 <col:39> 'const char [4]' lvalue "xxx"
> `-CXXDefaultArgExpr 0x9ef8cb0 <<invalid sloc>> 'libreoffice_internal::Dummy':'struct rtl::libreoffice_internal::Dummy'
Change-Id: I7b9de7ce6b5604c7d686c8a4a7034019cd1d75c4
Reviewed-on: https://gerrit.libreoffice.org/47029
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
improve the detection of stuff we can return by const &, instead of by
copying
Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69
Reviewed-on: https://gerrit.libreoffice.org/46915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8e45936ef5675d531be71496e8894b90eaf2f6e2
Reviewed-on: https://gerrit.libreoffice.org/46769
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
|
|
merge the droplong and convertuintptr into one new plugin.
Limit the analysis to looking at var decl's, since that seems to be
safest proposition, even if that too needs some careful analysis.
Change-Id: Id005baaf05cfb157ce44a06a1c81f08559a07d1f
Reviewed-on: https://gerrit.libreoffice.org/46851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I6e58b6bf0d10297ed3ac20de25c1eea42c9f2334
Reviewed-on: https://gerrit.libreoffice.org/46844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ic1e4fd2833dd0bcc64363733e7794448b2d4de37
Reviewed-on: https://gerrit.libreoffice.org/46839
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
<https://lists.freedesktop.org/archives/libreoffice/2017-December/079107.html>
"Clang baseline bump"
Change-Id: I18fca8794ea34118fc6308458064d0c28cf5caf7
Reviewed-on: https://gerrit.libreoffice.org/46557
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I6fd7a9fed3a80c91a3766fceefd43c5db0aa5275
Reviewed-on: https://gerrit.libreoffice.org/46763
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I84a7bcb891548416f0e1f1b20059f9b20c890d4c
Reviewed-on: https://gerrit.libreoffice.org/46686
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I28c9e436b9d434ce59394ee195ea39815ae49028
Reviewed-on: https://gerrit.libreoffice.org/46685
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I9dc4b369872a7c6c076ae9be1dcdf2f8385af8a7
Reviewed-on: https://gerrit.libreoffice.org/46684
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Icf42fdd40a2cf6cda82254f81a7e389c7bac8558
Reviewed-on: https://gerrit.libreoffice.org/46683
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Similar to libc++ in C++17 mode, some types like std::auto_ptr are indeed
removed in C++17 mode by default, and need _HAS_AUTO_PTR_ETC=1 to be enabled
(see <https://blogs.msdn.microsoft.com/vcblog/2017/12/08/c17-feature-removals-
and-deprecations/>).
Unlike libc++, also std::binary_function and std::unary_function are removed
(and need the same _HAS_AUTO_PTR_ETC=1 to enable). So either set that flag to
make external code build, or use patches (for external/mdds) to make externals'
files included in LO proper still work there.
Change-Id: I886cc0de8196255334ee03ec48cb4bc54d460afd
Reviewed-on: https://gerrit.libreoffice.org/46514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
After f82dc45bdb9e930878447015291c5b90c9325b57 "Use the canonical TemplateDecl",
builds on macOS (at least those using C++17 and recent trunk libc++) started to
emit false warnings for that
std::pair< Reference<XConnection>,sal_Bool> aRet;
aRet.second = false;
code in dbaccess/source/ui/dlg/DbAdminImpl.cxx. There's a declaration of
std::pair in type_traits and a definition in utility, and for some reason the
declaration in type_traits was deemed the canonical one, while the
SubstTemplateTypeParmType pointed at the definition in utility. So just check
both, the original and the canonical TemplateDecl.
Change-Id: I2fb9d5172c031e6ad4989b215f19d11a4b17f743
Reviewed-on: https://gerrit.libreoffice.org/46474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I31acbf104e49a4d1f077817a68d0b116fd2e0a30
|
|
Change-Id: Ifdf5da1f014c4f130eafed475c6781c029d54f1d
|
|
The only effect SAL_CALL effectively has on LO-internal code is to change non-
static member functions from __thiscall to __cdecl in MSVC (where all other
functions are __cdecl by default, anyway). (For 3rd-party code, it could be
argued that SAL_CALL is useful on function declarations in the URE stable
interface other than non-static member functions, too, in case 3rd-party code
uses a compiler switch to change the default calling convention to something
other than __cdecl. But loplugin:salcall exempts the URE stable interface,
anyway.)
One could argue that SAL_CALL, even if today it effectively only affects non-
static member functions in MSVC, could be extended in the future to affect more
functions on more platforms. However, the current code would already not
support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c
"loplugin:salcall fix functions" changed FrameControl_createInstance in
UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even
though its address (in ctl_component_getFacrory, in the same file) is passed to
cppuhelper::createSingleFactory as an argument of type
cppu::ComponentInstantiation, which is a pointer to SAL_CALL function.
Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6
Reviewed-on: https://gerrit.libreoffice.org/46436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ib18f61f10225d5499f94144c8a0f9efff40e43aa
Reviewed-on: https://gerrit.libreoffice.org/46366
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
"Indirect" calls to isSallCallFunction (for canonic and overridden
FunctionDecls) already needed to handle many cases of FunctionDecls spanning
macros, so it isn't that much more work to make that also work for cases called
directly from VisitFunctionDecl.
Change-Id: I529f148c8872b86aa1ef082c6cb73db8ab1866e7
Reviewed-on: https://gerrit.libreoffice.org/46367
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.
Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I214052491e90eb4147bf79d6fd3927266638c686
Reviewed-on: https://gerrit.libreoffice.org/46203
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...after a31267be1bb42e8a5f80a3b660bbf969eeb5b647 "Fix isSalCallFunction so it
also works on Windows", so that it actually does work on Windows.
Change-Id: I0218fb41b3e1000e2325967a18dfaafaa95fe415
Reviewed-on: https://gerrit.libreoffice.org/46193
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2de8448564c963d3361a828bb96dcdb15eddf717
Reviewed-on: https://gerrit.libreoffice.org/46151
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I27b7281723dd705e4304958458be3ea2fee7f3e6
Reviewed-on: https://gerrit.libreoffice.org/46112
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...after a31267be1bb42e8a5f80a3b660bbf969eeb5b647 "Fix isSalCallFunction so it
also works on Windows"
Change-Id: Ic770230f2dd6183f5937801f27e929ebfd39bb4a
Reviewed-on: https://gerrit.libreoffice.org/46111
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...to enable debug-only code in the plugins. Some situations in the plugin code
should never happen, yet must not by default report errors or trigger
assertions, as some newly written LO code could trigger them nevertheless (in
which case the plugin code will likely need to be adapted, to cater for these
presumed-impossible situations).
Such code can now be included in the plugins behind an if(isDebugMode()) guard,
and can explicitly be enabled with --enable-compiler-plugins=debug.
I deliberately made this a runtime rather than a compile time option (using
some #ifdef guards in the plugin code, say), as it IMO keeps the code more
readable, and also allows overridding COMPILER_PLUGINS_DEBUG=... on the make
command line.
Change-Id: Iea4f0c2783ad968a0de097fa710b3be1a248de73
Reviewed-on: https://gerrit.libreoffice.org/46096
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...where FunctionDecl::getReturnTypeSourceRange returns an invalid range because
it fails to take AttributedTypeLoc (as caused by SAL_CALL -> __cdecl) into
account.
Change-Id: I7835dfca7b890ba1bfdb99adaad78a627b6e0e17
Reviewed-on: https://gerrit.libreoffice.org/45909
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec
Reviewed-on: https://gerrit.libreoffice.org/46007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
At least recent libc++ has a std::string ctor overload without a (defaulted)
Allocator argument (which otherwise causes creation of a temporary Allocator
object and thus a ExprWithCleanups), so in C++17 mode (i.e., with no implicit
move CXXConstructExpr -> MaterializeTemporaryExpr -> CXXBindTemporaryExpr chain
in the way) CellInfo::toString (sw/source/filter/ww8/WW8TableInfo.cxx) has a
ReturnStmt of just
> ReturnStmt
> `-ImplicitCastExpr 'std::string':'class std::__1::basic_string<char>' <ConstructorConversion>
> `-CXXConstructExpr 'std::string':'class std::__1::basic_string<char>' 'void (const char *)'
> `-ImplicitCastExpr 'const char *' <NoOp>
> `-ImplicitCastExpr 'char *' <ArrayToPointerDecay>
> `-DeclRefExpr 'char [256]' lvalue Var 'sBuffer' 'char [256]'
that erroneously triggered loplugin:passstuffbyref.
Change-Id: I53c8911cb1356560692c003808280a103c399e25
Reviewed-on: https://gerrit.libreoffice.org/45916
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Iab95db31188ea2914a46d63a7ebef3d825e6ec42
Reviewed-on: https://gerrit.libreoffice.org/45851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...in various places, which is gone by default at least from recent libc++ in
C++17 mode. So bring it back there for now, until Boost is fixed.
Change-Id: I0b3128d114ab2b5693a84bdc7d2b9b9b9b5c3c76
Reviewed-on: https://gerrit.libreoffice.org/45910
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
CXXFLAGS_CXX11 is for the compiler used to compile LO proper. The plugin needs
to be compiled in a way compatible with compiling Clang, and the compiler and
any relevant flags can be controlled with COMPILER_PLUGINS_CXX. (And at least
on macOS when compiling LO against a locally-built recent Clang trunk,
CXXFLAGS_CXX11 will now contain -std=gnu++17, but COMPILER_PLUGINS_CXX can still
point at Apple's Xcode clang++, which does not understand -std=gnu++17.)
Also, if COMPILER_PLUGINS_CXX is not set, simply default it to g++ instead of
trying to construct an acceptable CLANGCXX value from CXX (which would be
Clang). (The problem with using Clang without CXXFLAGS_CXX11 is that Clang,
unlike GCC, typically defaults to C++03, but building compilerplugins requires
C++11 at least. That would cause e.g. the Gerrit/Jenkins linux_clang_dbgutil_64
builds to fail---but which also needs COMPILER_PLUGINS_CXX to be explicitly set
to "g++ -std=c++11" as GCC on those machines is still 4.8.5 defaulting to
C++03.)
Change-Id: Id4ee4e54fa871cb6e621069cd050ae5b31922b34
Reviewed-on: https://gerrit.libreoffice.org/45856
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|