Skip to content

Commit 9d5e477

Browse files
author
Tommy McMichen
committed
[CIR] Added missing types instead of auto
1 parent 8688931 commit 9d5e477

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/lib/CIR/Dialect/Transforms/LifetimeCheck.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ void LifetimeCheckPass::checkPointerDeref(mlir::Value addr, mlir::Location loc,
14441444
}
14451445

14461446
static const ASTCXXMethodDeclInterface getMethod(ModuleOp mod, CallOp callOp) {
1447-
auto method = callOp.getDirectCallee(mod);
1447+
cir::FuncOp method = callOp.getDirectCallee(mod);
14481448
if (!method || method.getBuiltin())
14491449
return nullptr;
14501450
return dyn_cast<ASTCXXMethodDeclInterface>(method.getAstAttr());
@@ -1747,9 +1747,9 @@ bool LifetimeCheckPass::isTaskType(mlir::Value taskVal) {
17471747
}
17481748

17491749
void LifetimeCheckPass::trackCallToCoroutine(CallOp callOp) {
1750-
if (auto calleeFuncOp = callOp.getDirectCallee(theModule)) {
1751-
if (calleeFuncOp.getCoroutine() ||
1752-
(calleeFuncOp.isDeclaration() && callOp->getNumResults() > 0 &&
1750+
if (cir::FuncOp callee = callOp.getDirectCallee(theModule)) {
1751+
if (callee.getCoroutine() ||
1752+
(callee.isDeclaration() && callOp->getNumResults() > 0 &&
17531753
isTaskType(callOp->getResult(0)))) {
17541754
currScope->localTempTasks.insert(callOp->getResult(0));
17551755
}
@@ -1781,10 +1781,10 @@ void LifetimeCheckPass::checkCall(CallOp callOp) {
17811781

17821782
// From this point on only owner and pointer class methods handling,
17831783
// starting from special methods.
1784-
auto calleeFuncOp = callOp.getDirectCallee(theModule);
1785-
if (calleeFuncOp && calleeFuncOp.getCxxSpecialMember())
1784+
cir::FuncOp callee = callOp.getDirectCallee(theModule);
1785+
if (callee && callee.getCxxSpecialMember())
17861786
if (auto cxxCtor =
1787-
dyn_cast<cir::CXXCtorAttr>(*calleeFuncOp.getCxxSpecialMember()))
1787+
dyn_cast<cir::CXXCtorAttr>(*callee.getCxxSpecialMember()))
17881788
return checkCtor(callOp, cxxCtor);
17891789
if (methodDecl.isMoveAssignmentOperator())
17901790
return checkMoveAssignment(callOp, methodDecl);

0 commit comments

Comments
 (0)