...where it failed with
> error: 'error' diagnostics expected but not seen:
> File C:/lo-clang/core/compilerplugins/clang/test/useuniqueptr.cxx Line 266: rather manage this var with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]
> File C:/lo-clang/core/compilerplugins/clang/test/useuniqueptr.cxx Line 275: rather manage this member with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]
apparently due to differences in how some std types are implemented.
Change-Id: Ib81ed1a1da867359e7f22bb6fb6ceb3e610e2b41
Reviewed-on: https://gerrit.libreoffice.org/67226
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
...where CompilerTest_compilerplugins_clang failed in
compilerplugins/clang/test/useuniqueptr.cxx due to Foo24's
HTMLAttrs::const_iterator it = m_aSetAttrTab.begin();
and either the old compiler lacked Clang's recent
<https://reviews.llvm.org/D50666> "Fix Stmt::ignoreImplicit" (and the above
initialization expression happens to include a CXXBindTemporaryExpr, at least
with libstdc++), or an even older compiler was used in pre-C++17 mode, so the
above initialization expression happens to include an elidable CXXConstructExpr
copy constructor call.
Change-Id: I757a9ad76829e399b4fe2da1c82863909b8c9657
Reviewed-on: https://gerrit.libreoffice.org/61531
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
...after 05a337e297eb0cfe88c99503d760bd9eaf495b7d "loplugin:useuniqueptr look
for deleting in loops with iterators", where it didn't emit the warning for
Foo24 in compilerplugins/clang/test/useuniqueptr.cxx during
CompilerTest_compilerplugins_clang, because in the initialization of
HTMLAttrs::const_iterator it = m_aSetAttrTab.begin();
the HTMLAttrs::const_iterator CXXConstructExpr happens to have a second,
defaulted argument.
Change-Id: I882a6dfb5cab1b147f790072f2545b13172c0f9a
Reviewed-on: https://gerrit.libreoffice.org/61530
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
I seem to have missed quite a few in
commit 9f4d23c15115d64febd6bf01f870cc157badd350
filter out some of the AST in the plugins
This nets me another 14% improvement
Change-Id: I39b980b49ced560f768045dbedd3ddfef29306c1
Reviewed-on: https://gerrit.libreoffice.org/59501
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
find more patterns of deleting member data
Change-Id: I8913e364200dad8405bac30dd8cab2a68c8bee8f
Reviewed-on: https://gerrit.libreoffice.org/59233
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
...which first added alternative names to and then deprecated getLocBegin/End
Change-Id: Iaefb8ce259057abfa6cd20f0b63c0ef2949a96b2
Reviewed-on: https://gerrit.libreoffice.org/58820
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
now that we have upgraded to VS2017, we can use std::unique_ptr in
std::map
Change-Id: Id01af07ccae7447405b8f0bc44b08043f453e54b
Reviewed-on: https://gerrit.libreoffice.org/57384
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
There are some problems here, this should fix one of them: the
getFilename function returns "<stdin>" for spelling locations, because
the input to clang is sort of preprocessed via -frewrite-includes if
icecream is used and the file is built on a remote host (whereas it's
apparently not preprocessed if the file is compiled locally by icecream).
Using getPresumedLoc() uses the #line directives in the preprocessed
input, which avoids the problem but is more expensive, so try to use it
only when necessary.
The getFileEntry(getMainFileID())->getName() pattern will also result
in "<stdin>", but fortunately icecream passes -main-file-name,
which oddly enough isn't used by the SourceManager's spelling locations,
but is available separately via CodeGenOptions.
This builds everything successfully with clang version 6.0.0:
ICECC_PREFERRED_HOST=myremote make check gb_SUPPRESS_TESTS=t
Change-Id: Ic121511683e5302d7b9d85186c8b9c4a5443fa1b
Reviewed-on: https://gerrit.libreoffice.org/54993
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
which is often a useful indicator that the callers can be made to use
std::unique_ptr
Change-Id: Idb1745d1f58dbcf389c9f60f1a5728d7d092ade5
Reviewed-on: https://gerrit.libreoffice.org/56238
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
update the plugin to check all methods for deleting fields.
Also remove the dead checks for new failing here, can never have worked,
because it is not calling the std::nothrow variant.
Change-Id: I139410e42f83ae2db0cd38ceee81c8b4c310268c
Reviewed-on: https://gerrit.libreoffice.org/52881
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>