You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/analyses/assert.ml
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,24 +14,24 @@ struct
14
14
(* transfer functions *)
15
15
16
16
letassert_fnmanecheckrefine=
17
-
let expr =CilType.Exp.show e in
18
-
letwarnwarn_fnmsg=
17
+
letassert_msgseverityfmt=
19
18
if check then
20
-
warn_fn msg
19
+
M.msg severity ~category:Assert fmt
20
+
else
21
+
GobPretty.igprintf () fmt
21
22
in
22
-
(* TODO: use format instead of %s for the following messages *)
23
23
matchQueries.eval_bool (Analyses.ask_of_man man) e with
24
24
|`Liftedfalse ->
25
-
warn (M.error ~category:Assert"%s") ("Assertion \""^ expr ^"\" will fail.");
25
+
assert_msg Error"Assertion \"%a\" will fail."CilType.Exp.pretty e;
26
26
if refine then raise Analyses.Deadcodeelse man.local
27
27
|`Liftedtrue ->
28
-
warn (M.success ~category:Assert"%s") ("Assertion \""^ expr ^"\" will succeed");
28
+
assert_msg Success"Assertion \"%a\" will succeed"CilType.Exp.pretty e;
29
29
man.local
30
30
|`Bot ->
31
-
M.error ~category:Assert"%s" ("Assertion \""^ expr ^"\" produces a bottom. What does that mean? (currently uninitialized arrays' content is bottom)");
31
+
M.error ~category:Assert"Assertion \"%a\" produces a bottom. What does that mean? (currently uninitialized arrays' content is bottom)"CilType.Exp.pretty e;
32
32
man.local
33
33
|`Top ->
34
-
warn (M.warn ~category:Assert"%s") ("Assertion \""^ expr ^"\" is unknown.");
34
+
assert_msg Warning"Assertion \"%a\" is unknown."CilType.Exp.pretty e;
0 commit comments