Skip to content

Commit

Permalink
Fix location of return expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Apr 11, 2022
1 parent faff341 commit 56f5f9a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/frontc/cabs2cil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 56f5f9a

Please sign in to comment.