[clang-tools-extra] [clang] [llvm] [clang] Refactor Builtins.def to be a tablegen file (PR #68324)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 06:59:02 PST 2024


mikaelholmen wrote:

Hi,

This patch changed
```
BUILTIN(__builtin___stpncpy_chk, "c*c*cC*zz", "nF")
```
into
```
def StpncpyChk : Builtin {
  let Spellings = ["__builtin___stpncpy_chk"];
  let Attributes = [FunctionWithBuiltinPrefix, NoThrow];
  let Prototype = "int(char*, char*, char const*, size_t, size_t)";
}
```
Something wrong there isn't it?
Looks like the old signature was
```
char*(char*,char const*, size_t, size_T)
```
I haven't examined all builtins so no idea if there are more errors, I found this one when testing with -D_FORTIFY_SOURCE=2

https://github.com/llvm/llvm-project/pull/68324


More information about the cfe-commits mailing list