From 56f5f9ad58e71908ff66e179e056a22ea71693a2 Mon Sep 17 00:00:00 2001 From: Simmo Saan Date: Mon, 11 Apr 2022 17:07:36 +0300 Subject: [PATCH] Fix location of return expressions --- src/frontc/cabs2cil.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontc/cabs2cil.ml b/src/frontc/cabs2cil.ml index c6ad353dc..c60c29727 100644 --- a/src/frontc/cabs2cil.ml +++ b/src/frontc/cabs2cil.ml @@ -6697,6 +6697,7 @@ and doStatement (s : A.statement) : chunk = | A.RETURN (e, loc) -> let loc' = convLoc loc in currentLoc := loc'; + currentExpLoc := loc'; (* TODO: separate expression loc *) (* Sometimes we return the result of a void function call *) if isVoidType !currentReturnType then begin ignore (warnOpt "Return statement with a value in function returning void");