================ @@ -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)')}} ---------------- NagyDonat wrote:
The static analyzer tests usually add `-Wno-...` to the `RUN:` lines in order to silence the compiler warnings that overlap with the tested feature. I think that would be slightly more elegant here than these long `expected` lines. 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