Skip to content
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

Make --top4 matching case-insensitive. #4924

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Make --top4 matching case-insensitive. #4924

merged 1 commit into from
Sep 30, 2024

Conversation

fruffy
Copy link
Collaborator

@fruffy fruffy commented Sep 27, 2024

Came up in #4923. I do not see a reason why the pattern matching here needs to be case-sensitive. Case-insensitive matching can be more convenient.

@fruffy fruffy added the core Topics concerning the core segments of the compiler (frontend, midend, parser) label Sep 27, 2024
Copy link
Contributor

@vlstill vlstill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to just use std::regex::icase (https://en.cppreference.com/w/cpp/regex/syntax_option_type). This would also work if the regex contained uppercase symbols, which would just fail to match with the current solution.

Signed-off-by: fruffy <fruffy@nyu.edu>
@fruffy
Copy link
Collaborator Author

fruffy commented Sep 27, 2024

uppercase symbols

What's an example of an uppercase symbol? - vs _?

@vlstill
Copy link
Contributor

vlstill commented Sep 30, 2024

uppercase symbols

What's an example of an uppercase symbol? - vs _?

I just meant letters :-). I.e. matching e.g. If pattern with a string that is transformed to lowercase does not work.

@fruffy fruffy added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit c33825e Sep 30, 2024
18 checks passed
@fruffy fruffy deleted the fruffy/lower_case_top4 branch September 30, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Topics concerning the core segments of the compiler (frontend, midend, parser)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants