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@redhat.com>
This commit is contained in:
@@ -447,8 +447,9 @@ bool UnnecessaryParen::VisitVarDecl(const VarDecl* varDecl)
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// these two are for "parentheses were disambiguated as a function declaration [-Werror,-Wvexing-parse]"
|
// these two are for "parentheses were disambiguated as a function declaration [-Werror,-Wvexing-parse]"
|
||||||
if (isa<CXXBindTemporaryExpr>(sub)
|
auto const sub2 = sub->IgnoreImplicit();
|
||||||
|| isa<CXXFunctionalCastExpr>(sub))
|
if (isa<CXXTemporaryObjectExpr>(sub2)
|
||||||
|
|| isa<CXXFunctionalCastExpr>(sub2))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
report(
|
report(
|
||||||
|
@@ -160,7 +160,7 @@ namespace pcr
|
|||||||
|
|
||||||
// loop through the secondary sets
|
// loop through the secondary sets
|
||||||
PropertyState eSecondaryState = PropertyState_DIRECT_VALUE;
|
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 != m_aSlaveHandlers.end();
|
||||||
++loop
|
++loop
|
||||||
)
|
)
|
||||||
@@ -210,7 +210,7 @@ namespace pcr
|
|||||||
putIntoBag( (*m_aSlaveHandlers.begin())->getSupportedProperties(), m_aSupportedProperties );
|
putIntoBag( (*m_aSlaveHandlers.begin())->getSupportedProperties(), m_aSupportedProperties );
|
||||||
|
|
||||||
// now intersect with the properties of *all* other handlers
|
// 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 != m_aSlaveHandlers.end();
|
||||||
++loop
|
++loop
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user