Author: Andy Kaylor Date: 2026-03-20T18:00:21Z New Revision: 4a5da64759ae7ebdd55655d0b65f94e6cb4c171c
URL: https://github.com/llvm/llvm-project/commit/4a5da64759ae7ebdd55655d0b65f94e6cb4c171c DIFF: https://github.com/llvm/llvm-project/commit/4a5da64759ae7ebdd55655d0b65f94e6cb4c171c.diff LOG: [CIR][NFC] Minor cleanups to missing feature markers (#187754) This fixes a few places where MissingFeatures asserts were incorrect, extends the text of two errorNYI diagnostics to disambiguate them, and fixes a typo in an adjacent comment. Added: Modified: clang/lib/CIR/CodeGen/CIRGenClass.cpp clang/lib/CIR/CodeGen/CIRGenDecl.cpp clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp clang/lib/CIR/CodeGen/CIRGenFunction.cpp Removed: ################################################################################ diff --git a/clang/lib/CIR/CodeGen/CIRGenClass.cpp b/clang/lib/CIR/CodeGen/CIRGenClass.cpp index 59c6adde7264b..7dca65eff4f7c 100644 --- a/clang/lib/CIR/CodeGen/CIRGenClass.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenClass.cpp @@ -739,10 +739,11 @@ void CIRGenFunction::emitCXXAggrConstructorCall( constantCount.erase(); } else { // Otherwise, emit the check. - cgm.errorNYI(e->getSourceRange(), "dynamic-length array expression"); + cgm.errorNYI(e->getSourceRange(), + "emitCXXAggrConstructorCall: dynamic-length array expression"); } - // Tradional LLVM codegen emits a loop here. CIR lowers to a loop as part of + // Traditional LLVM codegen emits a loop here. CIR lowers to a loop as part of // LoweringPrepare. // The alignment of the base, adjusted by the size of a single element, diff --git a/clang/lib/CIR/CodeGen/CIRGenDecl.cpp b/clang/lib/CIR/CodeGen/CIRGenDecl.cpp index d8676fe5dc3c4..94d8632a48437 100644 --- a/clang/lib/CIR/CodeGen/CIRGenDecl.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenDecl.cpp @@ -1034,7 +1034,7 @@ void CIRGenFunction::emitArrayDestroy(mlir::Value begin, size = constIntAttr.getUInt(); } else { cgm.errorNYI(begin.getDefiningOp()->getLoc(), - "dynamic-length array expression"); + "emitArrayDestroy: dynamic-length array expression"); } auto arrayTy = cir::ArrayType::get(cirElementType, size); diff --git a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp index a43e2aa0fabbb..9dec721269267 100644 --- a/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp @@ -1985,7 +1985,7 @@ mlir::Value ScalarExprEmitter::emitSub(const BinOpInfo &ops) { mlir::Value ScalarExprEmitter::emitShl(const BinOpInfo &ops) { // TODO: This misses out on the sanitizer check below. if (ops.isFixedPointOp()) { - assert(cir::MissingFeatures::fixedPointType()); + assert(!cir::MissingFeatures::fixedPointType()); cgf.cgm.errorNYI("fixed point"); return {}; } @@ -2017,7 +2017,7 @@ mlir::Value ScalarExprEmitter::emitShl(const BinOpInfo &ops) { mlir::Value ScalarExprEmitter::emitShr(const BinOpInfo &ops) { // TODO: This misses out on the sanitizer check below. if (ops.isFixedPointOp()) { - assert(cir::MissingFeatures::fixedPointType()); + assert(!cir::MissingFeatures::fixedPointType()); cgf.cgm.errorNYI("fixed point"); return {}; } diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp index 71a647e37ea52..4862dacfdeb1e 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp @@ -1268,7 +1268,7 @@ CIRGenFunction::emitArrayLength(const clang::ArrayType *origArrayType, // If it's a VLA, we have to load the stored size. Note that // this is the size of the VLA in bytes, not its size in elements. if (isa<VariableArrayType>(arrayType)) { - assert(cir::MissingFeatures::vlas()); + assert(!cir::MissingFeatures::vlas()); cgm.errorNYI(*currSrcLoc, "VLAs"); return builder.getConstInt(*currSrcLoc, sizeTy, 0); } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
