Skip to content

Commit 765b38f

Browse files
committed
[clang][Interp][NFC] Small code refactoring
1 parent 450dfab commit 765b38f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/AST/Interp/ByteCodeExprGen.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,15 +1934,13 @@ template <class Emitter>
19341934
const RecordType *ByteCodeExprGen<Emitter>::getRecordTy(QualType Ty) {
19351935
if (const PointerType *PT = dyn_cast<PointerType>(Ty))
19361936
return PT->getPointeeType()->getAs<RecordType>();
1937-
else
1938-
return Ty->getAs<RecordType>();
1937+
return Ty->getAs<RecordType>();
19391938
}
19401939

19411940
template <class Emitter>
19421941
Record *ByteCodeExprGen<Emitter>::getRecord(QualType Ty) {
1943-
if (auto *RecordTy = getRecordTy(Ty)) {
1942+
if (const auto *RecordTy = getRecordTy(Ty))
19441943
return getRecord(RecordTy->getDecl());
1945-
}
19461944
return nullptr;
19471945
}
19481946

0 commit comments

Comments
 (0)