[clang] [Clang] Fix crash in __builtin_assume_aligned (PR #114217)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 30 13:21:16 PDT 2024
================
@@ -74,7 +74,7 @@ int test13(int *a) {
}
int test14(int *a, int b) {
- a = (int *)__builtin_assume_aligned(b, 32); // expected-error {{incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *}}
+ a = (int *)__builtin_assume_aligned(b, 32); // expected-error {{non-pointer argument to '__builtin_assume_aligned' is not allowed}}
----------------
shafik wrote:
Can we add the test cases from the issue, specifically: https://github.com/llvm/llvm-project/issues/110914#issuecomment-2390964984 and https://github.com/llvm/llvm-project/issues/110914#issuecomment-2390985949
We should always include tests that trigger crashes we are fixing to catch possible future regression.
https://github.com/llvm/llvm-project/pull/114217
More information about the cfe-commits
mailing list