Skip to content

Commit 3d8a44d

Browse files
committed
[clang][Interp][NFC] Refactor if condition
Move the declaration into the condition.
1 parent e5fb656 commit 3d8a44d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clang/lib/AST/Interp/InterpFrame.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,8 @@ Pointer InterpFrame::getLocalPointer(unsigned Offset) const {
209209

210210
Pointer InterpFrame::getParamPointer(unsigned Off) {
211211
// Return the block if it was created previously.
212-
auto Pt = Params.find(Off);
213-
if (Pt != Params.end()) {
212+
if (auto Pt = Params.find(Off); Pt != Params.end())
214213
return Pointer(reinterpret_cast<Block *>(Pt->second.get()));
215-
}
216214

217215
// Allocate memory to store the parameter and the block metadata.
218216
const auto &Desc = Func->getParamDescriptor(Off);

0 commit comments

Comments
 (0)