Author: Timm Bäder Date: 2024-02-12T15:36:07+01:00 New Revision: 15b0cc1212701908400e8059c6581ffe85d8070f
URL: https://github.com/llvm/llvm-project/commit/15b0cc1212701908400e8059c6581ffe85d8070f DIFF: https://github.com/llvm/llvm-project/commit/15b0cc1212701908400e8059c6581ffe85d8070f.diff LOG: [clang][Interp][NFC] Move a declaration into an if statement Added: Modified: clang/lib/AST/Interp/ByteCodeExprGen.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 6993d751fe58f..8a2c1e54e10a5 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -2283,8 +2283,7 @@ bool ByteCodeExprGen<Emitter>::dereferenceParam( const Expr *LV, PrimType T, const ParmVarDecl *PD, DerefKind AK, llvm::function_ref<bool(PrimType)> Direct, llvm::function_ref<bool(PrimType)> Indirect) { - auto It = this->Params.find(PD); - if (It != this->Params.end()) { + if (auto It = this->Params.find(PD); It != this->Params.end()) { unsigned Idx = It->second.Offset; switch (AK) { case DerefKind::Read: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits