Skip to content

Commit

Permalink
[clang][Interp][NFC] Move a declaration into an if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Jul 5, 2023
1 parent 3edc419 commit 05bc1d0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clang/lib/AST/Interp/Program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 05bc1d0

Please sign in to comment.