steakhal added a comment.

I'm looking forward to this patch.



================
Comment at: clang/test/Analysis/string.c:367-373
+void *func_strcpy_no_assertion();
+char ***ptr_strcpy_no_assertion;
+void strcpy_no_assertion() {
+  *(unsigned char **)ptr_strcpy_no_assertion = (unsigned char 
*)(func_strcpy_no_assertion());
+  char c;
+  strcpy(**ptr_strcpy_no_assertion, &c); // no-assertion
+}
----------------
steakhal wrote:
> I would prefer slightly more readbale names.
> `func_strcpy_no_assertion()` -> `get_void_ptr()`
> `ptr_strcpy_no_assertion ` -> `type_punned_ptr`
> `no-assertion` -> `no-crash`
> You could also hoist the `char a` as a function parameter to spare a line :)
I think this is 'done'. :)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89055/new/

https://reviews.llvm.org/D89055

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to