Author: Timm Bäder Date: 2023-07-05T09:05:54+02:00 New Revision: 05bc1d0e7c9abbbcd52ea1f2b6da29da8d311bd2
URL: https://github.com/llvm/llvm-project/commit/05bc1d0e7c9abbbcd52ea1f2b6da29da8d311bd2 DIFF: https://github.com/llvm/llvm-project/commit/05bc1d0e7c9abbbcd52ea1f2b6da29da8d311bd2.diff LOG: [clang][Interp][NFC] Move a declaration into an if statement Added: Modified: clang/lib/AST/Interp/Program.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/Program.cpp b/clang/lib/AST/Interp/Program.cpp index a9749022ee677b..5adc4cf3b54748 100644 --- a/clang/lib/AST/Interp/Program.cpp +++ b/clang/lib/AST/Interp/Program.cpp @@ -222,10 +222,8 @@ Record *Program::getOrCreateRecord(const RecordDecl *RD) { return nullptr; // Deduplicate records. - auto It = Records.find(RD); - if (It != Records.end()) { + if (auto It = Records.find(RD); It != Records.end()) return It->second; - } // We insert nullptr now and replace that later, so recursive calls // to this function with the same RecordDecl don't run into _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits