[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 5 12:14:33 UTC 2019
compilerplugins/clang/simplifyconstruct.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 265552e8ab1ba86f09146470156ee32db269197b
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Sep 5 12:01:16 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Sep 5 14:13:33 2019 +0200
Use compat::IgnoreImplicit
...for reliable results across Clang versions. Also, there appears to be no
need to check for CXXTemporaryObjectExpr both before and after IgnoreImplicit.
Change-Id: Ib804591b6d50073c99680d0933e21f32bba29342
Reviewed-on: https://gerrit.libreoffice.org/78640
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/compilerplugins/clang/simplifyconstruct.cxx b/compilerplugins/clang/simplifyconstruct.cxx
index 55f2404f8ab1..bd8aaaf03957 100644
--- a/compilerplugins/clang/simplifyconstruct.cxx
+++ b/compilerplugins/clang/simplifyconstruct.cxx
@@ -88,8 +88,8 @@ bool SimplifyConstruct::VisitVarDecl(VarDecl const* varDecl)
return true;
auto init = varDecl->getInit();
- if (!isa<CXXFunctionalCastExpr>(init->IgnoreImplicit()) && !isa<CXXTemporaryObjectExpr>(init)
- && !isa<CXXTemporaryObjectExpr>(init->IgnoreImplicit()))
+ auto const e1 = compat::IgnoreImplicit(init);
+ if (!isa<CXXFunctionalCastExpr>(e1) && !isa<CXXTemporaryObjectExpr>(e1))
return true;
// e.g. the LANGUAGE_DONTKNOW defines
More information about the Libreoffice-commits
mailing list