@@ -39,7 +39,8 @@ void goto_check(
3939 " overflow-check)" \
4040 " (pointer-overflow-check)(conversion-check)(undefined-shift-check)" \
4141 " (float-overflow-check)(nan-check)(no-built-in-assertions)" \
42- " (pointer-primitive-check)"
42+ " (pointer-primitive-check)" \
43+ " (retain-trivial-checks)"
4344
4445// clang-format off
4546#define HELP_GOTO_CHECK \
@@ -54,9 +55,10 @@ void goto_check(
5455 " --undefined-shift-check check shift greater than bit-width\n " \
5556 " --float-overflow-check check floating-point for +/-Inf\n " \
5657 " --nan-check check floating-point for NaN\n " \
57- " --no-built-in-assertions ignore assertions in built-in library\n " \
5858 " --enum-range-check checks that all enum type expressions have values in the enum range\n " /* NOLINT(whitespace/line_length) */ \
59- " --pointer-primitive-check checks that all pointers in pointer primitives are valid or null\n " /* NOLINT(whitespace/line_length) */
59+ " --pointer-primitive-check checks that all pointers in pointer primitives are valid or null\n " /* NOLINT(whitespace/line_length) */ \
60+ " --no-built-in-assertions ignore assertions in built-in library\n " \
61+ " --retain-trivial-checks include checks that are trivially true\n " \
6062
6163#define PARSE_OPTIONS_GOTO_CHECK (cmdline, options ) \
6264 options.set_option(" bounds-check" , cmdline.isset(" bounds-check" )); \
@@ -72,7 +74,10 @@ void goto_check(
7274 options.set_option(" float-overflow-check" , cmdline.isset(" float-overflow-check" )); /* NOLINT(whitespace/line_length) */ \
7375 options.set_option(" nan-check" , cmdline.isset(" nan-check" )); \
7476 options.set_option(" built-in-assertions" , !cmdline.isset(" no-built-in-assertions" )); /* NOLINT(whitespace/line_length) */ \
75- options.set_option(" pointer-primitive-check" , cmdline.isset(" pointer-primitive-check" )) /* NOLINT(whitespace/line_length) */
77+ options.set_option(" pointer-primitive-check" , cmdline.isset(" pointer-primitive-check" )); /* NOLINT(whitespace/line_length) */ \
78+ options.set_option(" retain-trivial-checks" , \
79+ cmdline.isset(" retain-trivial-checks" )); \
80+ (void )0
7681// clang-format on
7782
7883#endif // CPROVER_ANALYSES_GOTO_CHECK_H
0 commit comments