Skip to content

Commit 1abd56d

Browse files
committed
To Be Squashed
- Gate the integer literal radix retaining functionality behind option `keep_integer_radices`, defaulting to `false` for now. - Add the new `--keep-integer-radices` flag to test headers that are affected by it.
1 parent 91928a9 commit 1abd56d

18 files changed

+50
-16
lines changed

bindgen-tests/tests/headers/class_static_const.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --with-derive-hash --with-derive-partialeq --with-derive-eq
1+
// bindgen-flags: --with-derive-hash --with-derive-partialeq --with-derive-eq --keep-integer-radices
22
using int32_t = int;
33
typedef unsigned int uint32_t;
44

bindgen-tests/tests/headers/constant-evaluate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// bindgen-unstable
2-
// bindgen-flags: --rustified-enum ".*"
2+
// bindgen-flags: --rustified-enum ".*" --keep-integer-radices
33

44
enum {
55
foo = 4,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// bindgen-flags: --default-macro-constant-type signed
1+
// bindgen-flags: --default-macro-constant-type signed --keep-integer-radices
22
// All values are i32 if they fit; otherwise i64.
33
#include "default-macro-constant-type.h"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// bindgen-flags: --default-macro-constant-type unsigned
1+
// bindgen-flags: --default-macro-constant-type unsigned --keep-integer-radices
22
// Negative values are i32 or i64; others are u32 or u64.
33
#include "default-macro-constant-type.h"

bindgen-tests/tests/headers/default-macro-constant-type.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// bindgen-flags: --keep-integer-radices
12
// Test default of --default-macro-constant-type
23
// Negative values are i32 or i64; others are u32 or u64.
34

bindgen-tests/tests/headers/different_radix_literals.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: -- -std=c++14
1+
// bindgen-flags: --keep-integer-radices -- -std=c++14
22
// (C23 is not available in clang 9.0, but C++14 supports the same literals)
33

44
// Binary integer literals (C23) - 0b10 is 2 in decimal
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// bindgen-flags: --default-macro-constant-type=signed --fit-macro-constant-types
1+
// bindgen-flags: --default-macro-constant-type=signed --fit-macro-constant-types --keep-integer-radices
22
#include "default-macro-constant-type.h"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --fit-macro-constant-types
1+
// bindgen-flags: --fit-macro-constant-types --keep-integer-radices
22
// Test fitting macro constants into smaller integer types
33
// Negative values are i8, i16, i32 or i64; others are u8, u16, u32 or u64.
44
#include "default-macro-constant-type.h"

bindgen-tests/tests/headers/jsval_layout_opaque.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --with-derive-hash --with-derive-partialeq --with-derive-eq --rustified-enum ".*"
1+
// bindgen-flags: --with-derive-hash --with-derive-partialeq --with-derive-eq --rustified-enum ".*" --keep-integer-radices
22
// bindgen-flags: -- -std=c++11
33

44
/**

bindgen-tests/tests/headers/layout_eth_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --with-derive-hash --with-derive-partialeq --with-derive-eq --rustified-enum ".*" --rust-target 1.40
1+
// bindgen-flags: --with-derive-hash --with-derive-partialeq --with-derive-eq --rustified-enum ".*" --rust-target 1.40 --keep-integer-radices
22
typedef unsigned char uint8_t;
33
typedef unsigned short uint16_t;
44
typedef unsigned int uint32_t;

0 commit comments

Comments
 (0)