================ @@ -96,3 +96,19 @@ void test_snprintf6() { char b[4] = {0}; snprintf(a, sizeof(a), "%s", b); // no-warning } + + +void memcpy(int dst, int src, size_t size); // expected-warning{{incompatible redeclaration of library function 'memcpy'}} expected-note{{'memcpy' is a builtin with type 'void *(void *, const void *, __size_t)' (aka 'void *(void *, const void *, unsigned long)')}} +void test_memcpy_proxy() { + memcpy(42, 42, 42); ---------------- NagyDonat wrote:
```suggestion memcpy(42, 42, 42); // no-crash ``` Tests that validate that some code fragment no longer causes crashes are usually annotated by `// no-crash` at the point where the crash occurred previously. This has no significance in the test automation (a crash always means test failure), but helps the human readers understand why that testcase was included in the test suite. This tradition is not always followed and the commit would be perfectly acceptable eve without these marks, but if it isn't a trouble, I'd suggest adding `// no-crash` both here and in the other two testcases. https://github.com/llvm/llvm-project/pull/160511 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits