Skip to content

Commit 8a1457c

Browse files
committed
test: explicitly make a value unsigned on Windows
Windows will keep the imported type as `signed long long` rather than `unsigned long long` as per the Microsoft compiler behaviour. This breaks the tests for this case. Unfortunately, this is one of those areas which must differ.
1 parent 27801ce commit 8a1457c

File tree

1 file changed

+6
-0
lines changed
  • test/Inputs/clang-importer-sdk/usr/include

1 file changed

+6
-0
lines changed

test/Inputs/clang-importer-sdk/usr/include/macros.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
#define EOF (-1)
1313
#define UINT32_MAX 0xFFFFFFFFU
1414
#define INT64_MAX 0x7FFFFFFFFFFFFFFFLL
15+
#if defined(_WIN32)
16+
// MSVC compatibility will always return a signed value when the suffix is `LL`
17+
// or `i64` and other targets will promote it to an unsigned type.
18+
#define UINT64_MAX 0xFFFFFFFFFFFFFFFFULL
19+
#else
1520
#define UINT64_MAX 0xFFFFFFFFFFFFFFFFLL
21+
#endif
1622
#define MINUS_THREE -3
1723
#define true 1
1824
#define false 0

0 commit comments

Comments
 (0)