r335139 - Simplify. No behavior change.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 20 08:57:38 PDT 2018


Author: nico
Date: Wed Jun 20 08:57:38 2018
New Revision: 335139

URL: http://llvm.org/viewvc/llvm-project?rev=335139&view=rev
Log:
Simplify. No behavior change.

Modified:
    cfe/trunk/lib/Sema/SemaInit.cpp

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=335139&r1=335138&r2=335139&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Wed Jun 20 08:57:38 2018
@@ -6446,13 +6446,7 @@ static void CheckMoveOnConstruction(Sema
 
   // Find the std::move call and get the argument.
   const CallExpr *CE = dyn_cast<CallExpr>(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();




More information about the cfe-commits mailing list