Skip to content

Commit 86cb32a

Browse files
author
martin
committed
Explicitly mark some options as legacy and suggest modern versions
1 parent 4ec09df commit 86cb32a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,16 @@ void goto_analyzer_parse_optionst::get_command_line_options(optionst &options)
160160
"simplify-slicing",
161161
!(cmdline.isset("no-simplify-slicing")));
162162
}
163+
// Legacy options
163164
else if(cmdline.isset("show-intervals"))
164165
{
165166
// For backwards compatibility
166167
options.set_option("show", true);
167168
options.set_option("general-analysis", true);
168169
options.set_option("intervals", true);
169170
options.set_option("domain set", true);
171+
log.status() << "--show-intervals is deprecated,"
172+
<< "please use --show --intervals" << messaget::eom;
170173
}
171174
else if(cmdline.isset("show-non-null"))
172175
{
@@ -175,6 +178,8 @@ void goto_analyzer_parse_optionst::get_command_line_options(optionst &options)
175178
options.set_option("general-analysis", true);
176179
options.set_option("non-null", true);
177180
options.set_option("domain set", true);
181+
log.status() << "--show-non-null is deprecated,"
182+
<< "please use --show --non-null" << messaget::eom;
178183
}
179184
else if(cmdline.isset("intervals") || cmdline.isset("non-null"))
180185
{

src/goto-analyzer/goto_analyzer_parse_options.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ class optionst;
144144
"(taint):(show-taint)" \
145145
"(show-local-may-alias)"
146146

147+
#define GOTO_ANALYZER_OPTIONS_LEGACY \
148+
"(show-intervals)(show-non-null)" \
149+
147150
#define GOTO_ANALYSER_OPTIONS \
148151
OPT_FUNCTIONS \
149152
OPT_CONFIG_C_CPP \
@@ -159,7 +162,6 @@ class optionst;
159162
OPT_VALIDATE \
160163
GOTO_ANALYSER_OPTIONS_TASKS \
161164
"(no-simplify-slicing)" \
162-
"(show-intervals)(show-non-null)" \
163165
GOTO_ANALYSER_OPTIONS_AI \
164166
"(location-sensitive)(concurrent)" \
165167
GOTO_ANALYSER_OPTIONS_HISTORY \
@@ -168,6 +170,7 @@ class optionst;
168170
GOTO_ANALYSER_OPTIONS_STORAGE \
169171
GOTO_ANALYSER_OPTIONS_OUTPUT \
170172
GOTO_ANALYSER_OPTIONS_SPECIFIC_ANALYSES \
173+
GOTO_ANALYZER_OPTIONS_LEGACY \
171174
// clang-format on
172175

173176
class goto_analyzer_parse_optionst: public parse_options_baset

0 commit comments

Comments
 (0)