[clang] [clang] apply clang-tidy's llvm-redundant-casting (NFC) (PR #191322)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 10 01:01:02 PDT 2026


================
@@ -444,7 +444,7 @@ bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc) {
   // If we're evaluating the initializer for a constexpr variable in C23, we may
   // only read other contexpr variables. Abort here since this one isn't
   // constexpr.
-  if (const auto *VD = dyn_cast_if_present<VarDecl>(S.EvaluatingDecl);
----------------
tbaederr wrote:

To match the coding style, the `auto` should use the type instead after removing the cast.

https://github.com/llvm/llvm-project/pull/191322


More information about the cfe-commits mailing list