Skip to content

[CIR][NFC] Fix an unused variable warning #140783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions clang/lib/CIR/CodeGen/CIRGenCXXExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ RValue CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(
thisPtr = emitLValue(base);
}

if (const CXXConstructorDecl *ctor = dyn_cast<CXXConstructorDecl>(md)) {
if (isa<CXXConstructorDecl>(md)) {
cgm.errorNYI(ce->getSourceRange(),
"emitCXXMemberOrOperatorMemberCallExpr: constructor call");
return RValue::get(nullptr);
Expand All @@ -127,29 +127,29 @@ RValue CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr(
cgm.errorNYI(ce->getSourceRange(),
"emitCXXMemberOrOperatorMemberCallExpr: trivial assignment");
return RValue::get(nullptr);
} else {
assert(md->getParent()->mayInsertExtraPadding() &&
"unknown trivial member function");
}

assert(md->getParent()->mayInsertExtraPadding() &&
"unknown trivial member function");
}

// Compute the function type we're calling
const CXXMethodDecl *calleeDecl = md;
const CIRGenFunctionInfo *fInfo = nullptr;
if (const auto *dtor = dyn_cast<CXXDestructorDecl>(calleeDecl)) {
if (isa<CXXDestructorDecl>(calleeDecl)) {
cgm.errorNYI(ce->getSourceRange(),
"emitCXXMemberOrOperatorMemberCallExpr: destructor call");
return RValue::get(nullptr);
} else {
fInfo = &cgm.getTypes().arrangeCXXMethodDeclaration(calleeDecl);
}

fInfo = &cgm.getTypes().arrangeCXXMethodDeclaration(calleeDecl);

mlir::Type ty = cgm.getTypes().getFunctionType(*fInfo);

assert(!cir::MissingFeatures::sanitizers());
assert(!cir::MissingFeatures::emitTypeCheck());

if (const auto *dtor = dyn_cast<CXXDestructorDecl>(calleeDecl)) {
if (isa<CXXDestructorDecl>(calleeDecl)) {
cgm.errorNYI(ce->getSourceRange(),
"emitCXXMemberOrOperatorMemberCallExpr: destructor call");
return RValue::get(nullptr);
Expand Down