================
@@ -188,3 +188,12 @@ void strcpy_and_friends() {
strndup(FOO, sizeof(FOO)); // \
// expected-warning {{'strndup' call operates on objects of type 'const
char' while the size is based on a different type 'const char *'}}
expected-note{{did you mean to provide an explicit length?}}
}
+
+extern "C" int snprintf(char* buffer, __SIZE_TYPE__ buf_size, const char*
format, ...);
+extern "C" void* malloc(unsigned size);
+
+void check_prints(){
----------------
BgZun wrote:
I added multiple tests in my newest commit. I added your suggestions and a
couple of my own as well. If you could review and see if these tests are what
you had in mind.
Also during testing (thanks to your suggestions :) ) I found an issue when
explicit casts are used in the dest parameter so i fixed it
https://github.com/llvm/llvm-project/pull/170637
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits