Skip to content

Commit 56f5f9a

Browse files
committed
Fix location of return expressions
1 parent faff341 commit 56f5f9a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/frontc/cabs2cil.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6697,6 +6697,7 @@ and doStatement (s : A.statement) : chunk =
66976697
| A.RETURN (e, loc) ->
66986698
let loc' = convLoc loc in
66996699
currentLoc := loc';
6700+
currentExpLoc := loc'; (* TODO: separate expression loc *)
67006701
(* Sometimes we return the result of a void function call *)
67016702
if isVoidType !currentReturnType then begin
67026703
ignore (warnOpt "Return statement with a value in function returning void");

0 commit comments

Comments
 (0)