Make move detection in loplugin:passstuffbyref work with MSVCRT
...where an ImplicitCastExpr happens to appear between CXXConstructExpr and CallExpr Change-Id: I62226cc89d87bd3d9c03743b650f10c32c18f9be
This commit is contained in:
parent
bfcecd6774
commit
b998313d9d
@ -204,7 +204,7 @@ void PassStuffByRef::checkParams(const FunctionDecl * functionDecl) {
|
||||
auto cxxConstructExpr = dyn_cast<CXXConstructExpr>(cxxCtorInitializer->getInit());
|
||||
if (cxxConstructExpr && cxxConstructExpr->getNumArgs() == 1)
|
||||
{
|
||||
if (auto callExpr = dyn_cast<CallExpr>(cxxConstructExpr->getArg(0))) {
|
||||
if (auto callExpr = dyn_cast<CallExpr>(cxxConstructExpr->getArg(0)->IgnoreParenImpCasts())) {
|
||||
if (loplugin::DeclCheck(callExpr->getCalleeDecl()).Function("move").StdNamespace()) {
|
||||
bFoundMove = true;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user