nickdesaulniers added inline comments.
================ Comment at: clang/lib/CodeGen/CGDecl.cpp:1858 +static bool isEmptyClass(VarDecl const &D) { + const Type *Ty = D.getType().getTypePtr(); ---------------- inconsistent east const vs west const ================ Comment at: clang/lib/CodeGen/CGDecl.cpp:1859-1860 +static bool isEmptyClass(VarDecl const &D) { + const Type *Ty = D.getType().getTypePtr(); + if (const auto *CxxRecordTy = Ty->getAsCXXRecordDecl()) + return CxxRecordTy->isEmpty(); ---------------- You check if `CxxRecordTy` is `nullptr`; do you need to check if `Ty` is `nullptr` as well? ================ Comment at: clang/lib/CodeGen/CGDecl.cpp:1860 + const Type *Ty = D.getType().getTypePtr(); + if (const auto *CxxRecordTy = Ty->getAsCXXRecordDecl()) + return CxxRecordTy->isEmpty(); ---------------- What about `RecordDecl`'s in general? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155580/new/ https://reviews.llvm.org/D155580 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits