[PATCH] D51485: [Sema][NFC] Trivial cleanup in ActOnCallExpr

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 30 04:48:38 PDT 2018


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

Use logical or operator instead of a bool variable and if/else.


Repository:
  rC Clang

https://reviews.llvm.org/D51485

Files:
  lib/Sema/SemaExpr.cpp


Index: lib/Sema/SemaExpr.cpp
===================================================================
--- lib/Sema/SemaExpr.cpp
+++ lib/Sema/SemaExpr.cpp
@@ -5330,13 +5330,7 @@
 
     // Determine whether this is a dependent call inside a C++ template,
     // in which case we won't do any semantic analysis now.
-    bool Dependent = false;
-    if (Fn->isTypeDependent())
-      Dependent = true;
-    else if (Expr::hasAnyTypeDependentArguments(ArgExprs))
-      Dependent = true;
-
-    if (Dependent) {
+    if (Fn->isTypeDependent() || Expr::hasAnyTypeDependentArguments(ArgExprs)) {
       if (ExecConfig) {
         return new (Context) CUDAKernelCallExpr(
             Context, Fn, cast<CallExpr>(ExecConfig), ArgExprs,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51485.163304.patch
Type: text/x-patch
Size: 725 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180830/7c4c1f8a/attachment-0001.bin>


More information about the cfe-commits mailing list