-
Notifications
You must be signed in to change notification settings - Fork 274
Use cmdlinet::get_comma_separated_values where possible #6996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tautschnig
merged 1 commit into
diffblue:develop
from
tautschnig:cleanup/comma-separated-command-lines
Jul 6, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
CORE | ||
main.gb | ||
--breakpoint checkpoint --symbols p1,x,p2 | ||
--breakpoint checkpoint --symbols p1,x --symbols p2 | ||
^EXIT=0$ | ||
^SIGNAL=0$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ Author: Malte Mues <[email protected]> | |
#include <util/config.h> | ||
#include <util/exit_codes.h> | ||
#include <util/message.h> | ||
#include <util/string_utils.h> | ||
#include <util/version.h> | ||
|
||
#include <goto-programs/goto_model.h> | ||
|
@@ -103,9 +102,6 @@ int memory_analyzer_parse_optionst::doit() | |
|
||
std::string binary = cmdline.args.front(); | ||
|
||
const std::string symbol_list(cmdline.get_value("symbols")); | ||
std::vector<std::string> result = split_string(symbol_list, ',', true, true); | ||
|
||
auto opt = read_goto_binary(binary, ui_message_handler); | ||
|
||
if(!opt.has_value()) | ||
|
@@ -131,12 +127,8 @@ int memory_analyzer_parse_optionst::doit() | |
gdb_value_extractor.run_gdb_to_breakpoint(breakpoint); | ||
} | ||
|
||
std::vector<irep_idt> result_ids(result.size()); | ||
std::transform( | ||
result.begin(), result.end(), result_ids.begin(), [](std::string &name) { | ||
return irep_idt{name}; | ||
}); | ||
gdb_value_extractor.analyze_symbols(result_ids); | ||
gdb_value_extractor.analyze_symbols( | ||
cmdline.get_comma_separated_values("symbols")); | ||
|
||
std::ofstream file; | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting here, but more a comment for the PR and/or commit descriptions... But I was having a slightly hard time groking the intent of this PR until I saw this example here in the test case 👍 - So perhaps a clearer description might be something like:
Or words to that affect... not sure if its clearer or not to other people... but at least having the example in the description would be a big help :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I shamelessly copied this into the commit message!