]> granicus.if.org Git - clang/commitdiff
[Sema][NFC] Trivial cleanup in ActOnCallExpr
authorJan Korous <jkorous@apple.com>
Thu, 30 Aug 2018 14:46:48 +0000 (14:46 +0000)
committerJan Korous <jkorous@apple.com>
Thu, 30 Aug 2018 14:46:48 +0000 (14:46 +0000)
Use logical or operator instead of a bool variable and if/else.

Differential Revision: https://reviews.llvm.org/D51485

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@341074 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index 4a5196dc546592de8b9831463e7c3e6a373f938d..0431302a4e5ce73094fa57c24e4683dc1bed9745 100644 (file)
@@ -5330,13 +5330,7 @@ ExprResult Sema::ActOnCallExpr(Scope *Scope, Expr *Fn, SourceLocation LParenLoc,
 
     // 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,