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
// 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,