diff --git a/lib/Differentiator/ReverseModeVisitor.cpp b/lib/Differentiator/ReverseModeVisitor.cpp index ffdfea1b8..da7383e05 100644 --- a/lib/Differentiator/ReverseModeVisitor.cpp +++ b/lib/Differentiator/ReverseModeVisitor.cpp @@ -1652,7 +1652,7 @@ Expr* getArraySizeExpr(const ArrayType* AT, ASTContext& context, } Expr* CUDAExecConfig = nullptr; - if (auto KCE = dyn_cast(CE)) + if (const auto KCE = dyn_cast(CE)) CUDAExecConfig = Clone(KCE->getConfig()); // If the function is non_differentiable, return zero derivative.