[PATCH] D130666: [InstCombine] Add support for strlcpy folding
joanahalili via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 04:31:47 PDT 2022
joanahalili added a comment.
This might break the following opensource lib https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
In https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/configure#n445
The compilation for the following code no longer fails when setting `-Wno-error-implicit-function-declaration`
#include <string.h>
int main(int argc, char **argv) {
char dst[10];
strlcpy(dst, "test", sizeof(dst));
return 0;
}
Here show the behaviour difference between clang 14.0, clang trunk and gcc.
https://godbolt.org/z/hKETMoEd6
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130666/new/
https://reviews.llvm.org/D130666
More information about the llvm-commits
mailing list