Author: Timm Bäder Date: 2023-09-20T14:33:46+02:00 New Revision: 765b38fbf16bef0a0646a4bfc9a933cb8d11f5ba
URL: https://github.com/llvm/llvm-project/commit/765b38fbf16bef0a0646a4bfc9a933cb8d11f5ba DIFF: https://github.com/llvm/llvm-project/commit/765b38fbf16bef0a0646a4bfc9a933cb8d11f5ba.diff LOG: [clang][Interp][NFC] Small code refactoring 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 c813f9b6d9991c5..e813d4fa651ceaf 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -1934,15 +1934,13 @@ template <class Emitter> const RecordType *ByteCodeExprGen<Emitter>::getRecordTy(QualType Ty) { if (const PointerType *PT = dyn_cast<PointerType>(Ty)) return PT->getPointeeType()->getAs<RecordType>(); - else - return Ty->getAs<RecordType>(); + return Ty->getAs<RecordType>(); } template <class Emitter> Record *ByteCodeExprGen<Emitter>::getRecord(QualType Ty) { - if (auto *RecordTy = getRecordTy(Ty)) { + if (const auto *RecordTy = getRecordTy(Ty)) return getRecord(RecordTy->getDecl()); - } return nullptr; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits