mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-19 22:11:08 +00:00
[clang-tidy] Make test work on architectures which do not provide a __int128_t
See f10cee91ae
. The test did still not run successful since the
`CHECK-MESSAGE` line is still read and considered even though the `#ifdef` removes the code if
`__int128_t` is not available. Now there is a fallback type in this case.
This commit is contained in:
parent
115b3ace36
commit
b3079e8a7e
@ -288,10 +288,12 @@ int Test6() {
|
||||
|
||||
#ifdef __SIZEOF_INT128__
|
||||
template <__int128_t N>
|
||||
#else
|
||||
template <long N> // Fallback for platforms which do not define `__int128_t`
|
||||
#endif
|
||||
bool Baz() { return sizeof(A) < N; }
|
||||
// CHECK-MESSAGES: :[[@LINE-1]]:21: warning: suspicious comparison of 'sizeof(expr)' to a constant
|
||||
bool Test7() { return Baz<-1>(); }
|
||||
#endif
|
||||
|
||||
int ValidExpressions() {
|
||||
int A[] = {1, 2, 3, 4};
|
||||
|
Loading…
Reference in New Issue
Block a user