This revision was automatically updated to reflect the committed changes. Closed by commit rGcc6a6c48d4bb: [NFC][Clang] Fix Coverity bug with dereference null return value in clang… (authored by Manna).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151137/new/ https://reviews.llvm.org/D151137 Files: clang/lib/CodeGen/CGExpr.cpp Index: clang/lib/CodeGen/CGExpr.cpp =================================================================== --- clang/lib/CodeGen/CGExpr.cpp +++ clang/lib/CodeGen/CGExpr.cpp @@ -4102,6 +4102,7 @@ } } else { auto *CAT = C.getAsConstantArrayType(ArrayTy); + assert(CAT && "unexpected type for array initializer"); ConstLength = CAT->getSize(); } if (Length) {
Index: clang/lib/CodeGen/CGExpr.cpp =================================================================== --- clang/lib/CodeGen/CGExpr.cpp +++ clang/lib/CodeGen/CGExpr.cpp @@ -4102,6 +4102,7 @@ } } else { auto *CAT = C.getAsConstantArrayType(ArrayTy); + assert(CAT && "unexpected type for array initializer"); ConstLength = CAT->getSize(); } if (Length) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits