[PATCH] D14014: Checker of proper vfork usage
Anna Zaks via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 2 10:26:21 PST 2015
zaks.anna added a comment.
Thanks for addressing all the comments. A couple of additional ones below.
================
Comment at: test/Analysis/vfork.c:60
@@ +59,3 @@
+ // Ensure that returning from function is prohibited.
+ return 0;
+ }
----------------
Shouldn't the warning appear here as well?
You need to register for ReturnStmt callback instead of the checkEndFunction.
================
Comment at: test/Analysis/vfork.c:64
@@ +63,3 @@
+ while(1);
+} // expected-warning{{Return from this function is prohibited after a successful vfork}}
+
----------------
I think "from this function" is redundant in this particular error message.
"Return from this function is prohibited after a successful vfork" -> "Return is prohibited after a successful vfork; call _exit() instead."
http://reviews.llvm.org/D14014
More information about the cfe-commits
mailing list