diff options
| author | Egor Zhdan <e_zhdan@apple.com> | 2022-03-11 15:57:01 +0000 |
|---|---|---|
| committer | Egor Zhdan <e_zhdan@apple.com> | 2022-03-14 12:47:30 +0000 |
| commit | 6ca2f1938f96a71abdecdd96508f48e4d20a5694 (patch) | |
| tree | 1dfca4dbc44fc8dcdf692be23799f6a32a84f2ce /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 8896c36624b2eb848b892da2d29eb7a1a41bcc0e (diff) | |
[Clang][Sema] Avoid crashing for `__builtin_memcpy_inline` with an array argument
This change teaches the Sema logic for `__builtin_memcpy_inline` to implicitly convert arrays passed as arguments to pointers, similarly to regular `memcpy`.
This code will no longer cause a compiler crash:
```
void f(char *p) {
char s[1] = {0};
__builtin_memcpy_inline(p, s, 1);
}
```
rdar://88147527
Differential Revision: https://reviews.llvm.org/D121475
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
