Skip to content

Commit 7732455

Browse files
committed
Address code review comments
1 parent 6633ffe commit 7732455

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang/lib/CIR/CodeGen/CIRGenExprComplex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ mlir::Value ComplexExprEmitter::VisitChooseExpr(ChooseExpr *e) {
205205
mlir::Value
206206
ComplexExprEmitter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *e) {
207207
mlir::Location loc = cgf.getLoc(e->getExprLoc());
208-
mlir::Type complexLLVMTy = cgf.convertType(e->getType());
209-
return builder.getNullValue(complexLLVMTy, loc);
208+
mlir::Type complexTy = cgf.convertType(e->getType());
209+
return builder.getNullValue(complexTy, loc);
210210
}
211211

212212
mlir::Value ComplexExprEmitter::VisitDeclRefExpr(DeclRefExpr *e) {

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite(
10441044
getTypeConverter()));
10451045
return mlir::success();
10461046
} else if (auto complexTy = mlir::dyn_cast<cir::ComplexType>(op.getType())) {
1047-
auto complexElemTy = complexTy.getElementType();
1047+
mlir::Type complexElemTy = complexTy.getElementType();
10481048
mlir::Type complexElemLLVMTy = typeConverter->convertType(complexElemTy);
10491049

10501050
if (auto zeroInitAttr = mlir::dyn_cast<cir::ZeroAttr>(op.getValue())) {

0 commit comments

Comments
 (0)