[PATCH] D51488: [Sema][NFC] Small cleanup - remove dead code from ActOnCallExpr() ?

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 30 07:59:54 PDT 2018


jkorous created this revision.
jkorous added reviewers: rsmith, vsapsai, JDevlieghere.
jkorous added a project: clang.
Herald added subscribers: cfe-commits, dexonsmith.

Since there's no change to ArgExprs between here and the previous early exit starting at L 5333 it's effectively a dead code.

On the other hand a possible counter-argument is that code gets a bit more brittle.

WDYT?


Repository:
  rC Clang

https://reviews.llvm.org/D51488

Files:
  Sema/SemaExpr.cpp


Index: Sema/SemaExpr.cpp
===================================================================
--- Sema/SemaExpr.cpp
+++ Sema/SemaExpr.cpp
@@ -5369,9 +5369,6 @@
 
     // We aren't supposed to apply this logic if there's an '&' involved.
     if (!find.HasFormOfMemberPointer) {
-      if (Expr::hasAnyTypeDependentArguments(ArgExprs))
-        return new (Context) CallExpr(
-            Context, Fn, ArgExprs, Context.DependentTy, VK_RValue, RParenLoc);
       OverloadExpr *ovl = find.Expression;
       if (UnresolvedLookupExpr *ULE = dyn_cast<UnresolvedLookupExpr>(ovl))
         return BuildOverloadedCallExpr(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51488.163329.patch
Type: text/x-patch
Size: 615 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180830/89dd2de5/attachment.bin>


More information about the cfe-commits mailing list