Skip to content

Commit c50de57

Browse files
[flang] Fix a warning
This patch fixes: flang/lib/Optimizer/Transforms/StackArrays.cpp:452:7: error: ignoring return value of function declared with 'nodiscard' attribute [-Werror,-Wunused-result]
1 parent f44079d commit c50de57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Optimizer/Transforms/StackArrays.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ StackArraysAnalysisWrapper::analyseFunction(mlir::Operation *func) {
449449
const LatticePoint *lattice = solver.lookupState<LatticePoint>(op);
450450
// there will be no lattice for an unreachable block
451451
if (lattice)
452-
point.join(*lattice);
452+
(void)point.join(*lattice);
453453
};
454454
func->walk([&](mlir::func::ReturnOp child) { joinOperationLattice(child); });
455455
func->walk([&](fir::UnreachableOp child) { joinOperationLattice(child); });

0 commit comments

Comments
 (0)