@@ -38,7 +38,7 @@ void goto_check_c(
38
38
message_handlert &message_handler);
39
39
40
40
#define OPT_GOTO_CHECK \
41
- " (bounds-check)(pointer-check)(memory-leak-check)(memory-cleanup-check)" \
41
+ " (no- bounds-check)(pointer-check)(memory-leak-check)(memory-cleanup-check)" \
42
42
" (div-by-zero-check)(enum-range-check)" \
43
43
" (signed-overflow-check)(unsigned-overflow-check)" \
44
44
" (pointer-overflow-check)(conversion-check)(undefined-shift-check)" \
@@ -77,31 +77,36 @@ void goto_check_c(
77
77
" {y--no-assumptions} \t ignore user assumptions\n " \
78
78
" {y--assert-to-assume} \t convert user assertions to assumptions\n "
79
79
80
+ // clang-format off
81
+ #define PARSE_OPTIONS_GOTO_CHECK_DEFAULTS_OVERRIDE (cmdline, options ) \
82
+ options.set_option(" bounds-check" , !cmdline.isset(" no-bounds-check" )); \
83
+ options.set_option(" pointer-check" , !cmdline.isset(" no-pointer-check" )); \
84
+ options.set_option(" div-by-zero-check" , !cmdline.isset(" no-div-by-zero-check" )); \
85
+ options.set_option(" signed-overflow-check" , !cmdline.isset(" no-signed-overflow-check" )); /* NOLINT(whitespace/line_length) */ \
86
+ options.set_option(" undefined-shift-check" , !cmdline.isset(" no-undefined-shift-check" )); /* NOLINT(whitespace/line_length) */ \
87
+ options.set_option(" pointer-primitive-check" , !cmdline.isset(" no-pointer-primitive-check" )); /* NOLINT(whitespace/line_length) */ \
88
+ (void ) 0 ;
89
+ // clang-format on
90
+
80
91
// clang-format off
81
92
#define PARSE_OPTIONS_GOTO_CHECK (cmdline, options ) \
82
- options.set_option(" bounds-check" , !cmdline.isset(" no-bounds-check" )); \
83
- options.set_option(" pointer-check" , !cmdline.isset(" no-pointer-check" )); \
84
93
options.set_option(" memory-leak-check" , cmdline.isset(" memory-leak-check" )); \
85
94
options.set_option(" memory-cleanup-check" , cmdline.isset(" memory-cleanup-check" )); /* NOLINT(whitespace/line_length) */ \
86
- options.set_option(" div-by-zero-check" , !cmdline.isset(" no-div-by-zero-check" )); \
87
95
options.set_option(" enum-range-check" , cmdline.isset(" enum-range-check" )); \
88
- options.set_option(" signed-overflow-check" , !cmdline.isset(" no-signed-overflow-check" )); /* NOLINT(whitespace/line_length) */ \
89
96
options.set_option(" unsigned-overflow-check" , cmdline.isset(" unsigned-overflow-check" )); /* NOLINT(whitespace/line_length) */ \
90
97
options.set_option(" pointer-overflow-check" , cmdline.isset(" pointer-overflow-check" )); /* NOLINT(whitespace/line_length) */ \
91
98
options.set_option(" conversion-check" , cmdline.isset(" conversion-check" )); \
92
- options.set_option(" undefined-shift-check" , !cmdline.isset(" no-undefined-shift-check" )); /* NOLINT(whitespace/line_length) */ \
93
99
options.set_option(" float-overflow-check" , cmdline.isset(" float-overflow-check" )); /* NOLINT(whitespace/line_length) */ \
94
100
options.set_option(" nan-check" , cmdline.isset(" nan-check" )); \
95
101
options.set_option(" built-in-assertions" , !cmdline.isset(" no-built-in-assertions" )); /* NOLINT(whitespace/line_length) */ \
96
- options.set_option(" pointer-primitive-check" , !cmdline.isset(" no-pointer-primitive-check" )); /* NOLINT(whitespace/line_length) */ \
97
- options.set_option(" retain-trivial-checks" , \
98
- cmdline.isset(" retain-trivial-checks" )); \
99
102
options.set_option(" assertions" , !cmdline.isset(" no-assertions" )); /* NOLINT(whitespace/line_length) */ \
100
103
options.set_option(" assumptions" , !cmdline.isset(" no-assumptions" )); /* NOLINT(whitespace/line_length) */ \
104
+ options.set_option(" retain-trivial-checks" , \
105
+ cmdline.isset(" retain-trivial-checks" )); \
101
106
options.set_option(" assert-to-assume" , cmdline.isset(" assert-to-assume" )); /* NOLINT(whitespace/line_length) */ \
102
107
options.set_option(" retain-trivial" , cmdline.isset(" retain-trivial" )); /* NOLINT(whitespace/line_length) */ \
103
108
if (cmdline.isset(" error-label" )) \
104
- options.set_option(" error-label" , cmdline.get_values(" error-label" )); \
109
+ options.set_option(" error-label" , cmdline.get_values(" error-label" )); \
105
110
(void )0
106
111
// clang-format on
107
112
0 commit comments