Author: Kadir Cetinkaya Date: 2022-08-31T10:12:52+02:00 New Revision: b58ed43a7f6b67bdb03ab746b654c823f54c261f
URL: https://github.com/llvm/llvm-project/commit/b58ed43a7f6b67bdb03ab746b654c823f54c261f DIFF: https://github.com/llvm/llvm-project/commit/b58ed43a7f6b67bdb03ab746b654c823f54c261f.diff LOG: Revert "[clang] Fix a crash in constant evaluation" This reverts commit a5ab650714d05c2e49ec158dc99156118a893027. Added: Modified: clang/lib/AST/ExprConstant.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 2b1a30f8354fb..3df0e4292b6ca 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -4794,11 +4794,6 @@ static bool getDefaultInitValue(QualType T, APValue &Result) { Result = APValue((const FieldDecl *)nullptr); return true; } - // Can't access properties of an incomplete type. - if (!RD->hasDefinition()) { - Result = APValue(); - return false; - } Result = APValue(APValue::UninitStruct(), RD->getNumBases(), std::distance(RD->field_begin(), RD->field_end())); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits