Skip to content

Commit

Permalink
Prefix warning about modified locals with Information to make sure th…
Browse files Browse the repository at this point in the history
…ey are not misconstrued as warnings.
  • Loading branch information
michael-schwarz committed Mar 13, 2023
1 parent 7a605fb commit 4c80826
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/framework/constraints.ml
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,9 @@ struct
in
let modified_vars = Queries.VS.diff (res_ctx.ask (MayBeModifiedSinceSetjmp (targetnode, targetcontext))) setjmpvar in
(if Queries.VS.is_top modified_vars then
M.warn "Since setjmp at %s, potentially all locals were modified! Acessing them will yield Undefined Behavior." (Node.show targetnode)
M.warn "Information: Since setjmp at %s, potentially all locals were modified! Acessing them will yield Undefined Behavior." (Node.show targetnode)
else if not (Queries.VS.is_empty modified_vars) then
M.warn "Since setjmp at %s, locals %s were modified! Acessing them will yield Undefined Behavior." (Node.show targetnode) (Queries.VS.show modified_vars)
M.warn "Information: Since setjmp at %s, locals %s were modified! Acessing them will yield Undefined Behavior." (Node.show targetnode) (Queries.VS.show modified_vars)
else
()
);
Expand Down Expand Up @@ -820,9 +820,9 @@ struct
in
let modified_vars = Queries.VS.diff (path_ctx.ask (MayBeModifiedSinceSetjmp (node, c))) setjmpvar in
(if Queries.VS.is_top modified_vars then
M.warn "Since setjmp at %s, potentially all locals were modified! Acessing them will yield Undefined Behavior." (Node.show node)
M.warn "Information: Since setjmp at %s, potentially all locals were modified! Acessing them will yield Undefined Behavior." (Node.show node)
else if not (Queries.VS.is_empty modified_vars) then
M.warn "Since setjmp at %s, locals %s were modified! Acessing them will yield Undefined Behavior." (Node.show node) (Queries.VS.show modified_vars)
M.warn "Information: Since setjmp at %s, locals %s were modified! Acessing them will yield Undefined Behavior." (Node.show node) (Queries.VS.show modified_vars)
else
()
);
Expand Down

0 comments on commit 4c80826

Please sign in to comment.