From 2e7bf27afabf7dd4fce58a26b0eee4b60c42f337 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 20 Jun 2018 15:57:38 +0000 Subject: [PATCH] Simplify. No behavior change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335139 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaInit.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index cd6683e44f..b3f401e63a 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -6446,13 +6446,7 @@ static void CheckMoveOnConstruction(Sema &S, const Expr *InitExpr, // Find the std::move call and get the argument. const CallExpr *CE = dyn_cast(InitExpr->IgnoreParens()); - if (!CE || CE->getNumArgs() != 1) - return; - - const FunctionDecl *MoveFunction = CE->getDirectCallee(); - if (!MoveFunction || !MoveFunction->isInStdNamespace() || - !MoveFunction->getIdentifier() || - !MoveFunction->getIdentifier()->isStr("move")) + if (!CE || !CE->isCallToStdMove()) return; const Expr *Arg = CE->getArg(0)->IgnoreImplicit(); -- 2.50.1