summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-17 09:42:05 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-17 23:16:15 +0100
commit3fb587e89421a862a1e65f47cad17839e2b832e4 (patch)
tree769bcb6503c61b468ecf61cc9879045b642e9212 /compilerplugins
parent3c535b25110cb2b9cde41dd469d9ece2b52b1444 (diff)
Revert "Fix failure of loplugin:useuniqueptr with older compilers"
...0bf61855164af5751e78ca8626c10d604b1ab13b, which should be obsolete now: It speculated why 05a337e297eb0cfe88c99503d760bd9eaf495b7d "loplugin:useuniqueptr look for deleting in loops with iterators" had introduced Foo24 in compilerplugins/clang/test/useuniqueptr.cxx wrapped in #if CLANG_VERSION >= 50000 and came to the conclusion that "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". But both of those potential reasons should be moot now, as the Clang fix got introduced towards Clang 8, and LO requires C++17 now (except for 3rd-party code). Change-Id: I307afbbecc5f031bca2319c4b22d54bd467eac81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130116 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/useuniqueptr.cxx4
1 files changed, 0 insertions, 4 deletions
diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx
index ae95cbdfe99e..c0ef34b2823a 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -664,10 +664,6 @@ void UseUniquePtr::CheckLoopDelete(const FunctionDecl* functionDecl, const CXXDe
if (init)
{
init = init->IgnoreImplicit();
- if (!compiler.getLangOpts().CPlusPlus17)
- if (auto x = dyn_cast<CXXConstructExpr>(init))
- if (x->isElidable())
- init = x->getArg(0)->IgnoreImplicit();
if (auto x = dyn_cast<CXXConstructExpr>(init))
if (x->getNumArgs() == 1
|| (x->getNumArgs() >= 2 && isa<CXXDefaultArgExpr>(x->getArg(1))))