Fix compilerplugins/clang/test/passstuffbyref.cxx
...after 2a1fb4401d
"loplugin:passstuffbyref
improved returns", where compiling as C++17 causes a false positive for
S2::set1, whose return statement consists of
> `-ReturnStmt 0x9ef8d78 <col:23, col:44>
> `-ExprWithCleanups 0x9ef8d60 <col:30, col:44> 'class rtl::OUString'
> `-CXXFunctionalCastExpr 0x9ef8d38 <col:30, col:44> 'class rtl::OUString' functional cast to class rtl::OUString <ConstructorConversion>
> `-CXXBindTemporaryExpr 0x9ef8d18 <col:30, col:44> 'class rtl::OUString' (CXXTemporary 0x9ef8d10)
> `-CXXConstructExpr 0x9ef8cd0 <col:30, col:44> 'class rtl::OUString' 'void (char const &[4], typename libreoffice_internal::ConstCharArrayDetector<char const[4], libreoffice_internal::Dummy>::Type)'
> |-StringLiteral 0x9ef7160 <col:39> 'const char [4]' lvalue "xxx"
> `-CXXDefaultArgExpr 0x9ef8cb0 <<invalid sloc>> 'libreoffice_internal::Dummy':'struct rtl::libreoffice_internal::Dummy'
Change-Id: I7b9de7ce6b5604c7d686c8a4a7034019cd1d75c4
Reviewed-on: https://gerrit.libreoffice.org/47029
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -332,6 +332,9 @@ bool PassStuffByRef::isReturnExprDisqualified(const Expr* expr)
|
|||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (isa<CXXFunctionalCastExpr>(expr)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (isa<MaterializeTemporaryExpr>(expr)) {
|
if (isa<MaterializeTemporaryExpr>(expr)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user