[Libreoffice-commits] core.git: compilerplugins/clang extensions/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Feb 19 19:32:25 UTC 2019
compilerplugins/clang/unnecessaryparen.cxx | 5 +++--
extensions/source/propctrlr/propertycomposer.cxx | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 38642dafb6dd4aed75d70a9409f104c856802e7b
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Feb 19 17:38:24 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Feb 19 20:32:00 2019 +0100
Better loplugin:unnecessaryparen check for vexing parse
Change-Id: Id7b09a8556da25b81c056d5811ba721e781682d6
Reviewed-on: https://gerrit.libreoffice.org/68025
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/compilerplugins/clang/unnecessaryparen.cxx b/compilerplugins/clang/unnecessaryparen.cxx
index a39bcc813a63..287c080afb13 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -447,8 +447,9 @@ bool UnnecessaryParen::VisitVarDecl(const VarDecl* varDecl)
return true;
// these two are for "parentheses were disambiguated as a function declaration [-Werror,-Wvexing-parse]"
- if (isa<CXXBindTemporaryExpr>(sub)
- || isa<CXXFunctionalCastExpr>(sub))
+ auto const sub2 = sub->IgnoreImplicit();
+ if (isa<CXXTemporaryObjectExpr>(sub2)
+ || isa<CXXFunctionalCastExpr>(sub2))
return true;
report(
diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx
index 63d4c72790e4..b1997bd79c53 100644
--- a/extensions/source/propctrlr/propertycomposer.cxx
+++ b/extensions/source/propctrlr/propertycomposer.cxx
@@ -160,7 +160,7 @@ namespace pcr
// loop through the secondary sets
PropertyState eSecondaryState = PropertyState_DIRECT_VALUE;
- for ( HandlerArray::const_iterator loop = ( m_aSlaveHandlers.begin() + 1 );
+ for ( HandlerArray::const_iterator loop = m_aSlaveHandlers.begin() + 1;
loop != m_aSlaveHandlers.end();
++loop
)
@@ -210,7 +210,7 @@ namespace pcr
putIntoBag( (*m_aSlaveHandlers.begin())->getSupportedProperties(), m_aSupportedProperties );
// now intersect with the properties of *all* other handlers
- for ( HandlerArray::const_iterator loop = ( m_aSlaveHandlers.begin() + 1 );
+ for ( HandlerArray::const_iterator loop = m_aSlaveHandlers.begin() + 1;
loop != m_aSlaveHandlers.end();
++loop
)
More information about the Libreoffice-commits
mailing list