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

[Bug][Help] Fixed all the categories getting printing for --help #2609

Open
wants to merge 1 commit into
base: SYCLomatic
Choose a base branch
from

Conversation

TejaX-Alaghari
Copy link
Contributor

@TejaX-Alaghari TejaX-Alaghari commented Jan 8, 2025

This PR fixes the bug where opts from all the cat are printed when dpct --help is called with no options resulting in duplicate entries.
Expected behavior is to print all the options only once.

Here is the sample output:

Copy link
Contributor

@zhiweij1 zhiweij1 left a comment

Choose a reason for hiding this comment

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

Two suggestions about coding style. The rest LGTM.

@@ -2980,7 +2980,7 @@ void HelpPrinterWrapper::operator=(bool Value) {
#ifdef SYCLomatic_CUSTOMIZATION
void HelpPrinterWrapper::operator=(CtHelpCategory Value) {
CategorizedPrinter.setReqCtHelpCategory(Value);
cl::HideUnrelatedOptions(CategorizedPrinter.getReqCtHelpCategory(Value));
// cl::HideUnrelatedOptions(CategorizedPrinter.getReqCtHelpCategory(Value));
Copy link
Contributor

Choose a reason for hiding this comment

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

If it is not needed, please remove this line.

Copy link
Contributor Author

@TejaX-Alaghari TejaX-Alaghari Jan 9, 2025

Choose a reason for hiding this comment

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

Upon further analysis, decided to retain it

@TejaX-Alaghari TejaX-Alaghari force-pushed the fixes branch 2 times, most recently from 902afcb to 1a40993 Compare January 9, 2025 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants