[PATCH] D124977: [NFC][Clang] Modify expect of fail test or XFAIL because CSKY align is different
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 9 06:28:29 PDT 2022
aaron.ballman added inline comments.
================
Comment at: clang/test/Sema/builtin-alloca-with-align.c:32
void test8(void) {
+#if defined(__csky__)
__builtin_alloca_with_align(sizeof(__INT64_TYPE__), __alignof__(__INT64_TYPE__)); // expected-warning {{second argument to __builtin_alloca_with_align is supposed to be in bits}}
----------------
rengolin wrote:
> zixuan-wu wrote:
> > rengolin wrote:
> > > This test is platform agnostic, perhaps the extra error could be in a new test, exclusively for csky?
> > Then I prefer to split the file and add UNSUPPORTED for CSKY in the other file which only contains test8
> But then you wouldn't be testing the extra error you want... hmm.
>
> Maybe it would be fine the way you did it originally.
>
> Would be nice to get a clang person to give their opinion.
// Comment which explains why this is special.
I think I would test this slightly differently:
```
void test8(void) {
__builtin_alloca_with_align(sizeof(__INT64_TYPE__), __alignof__(__INT64_TYPE__)); // expected-warning {{second argument to __builtin_alloca_with_align is supposed to be in bits}}
#ifdef __csky__
// expected-error at -2 {{requested alignment must be 8 or greater}}
// Comment which explains why this is special.
#endif // __csky__
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124977/new/
https://reviews.llvm.org/D124977
More information about the cfe-commits
mailing list