diff options
| author | aidanfnv <aidanf@nvidia.com> | 2025-08-11 11:54:47 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-11 18:54:47 +0000 |
| commit | 5b64150cdf0dfd6e068cdf27c5ea857c2d967d15 (patch) | |
| tree | 3932372950e4524f9e011738b89a15887bf553d8 /tests/cpp-compiler/c-compile-error.c | |
| parent | dcdebc1a76a0a6ffbfd6a5805354f8f679c60202 (diff) | |
Do case-sensitive search for category first in slangc -h (#8142)
Related to #7969
In the slangc help text we have two categories, the option category
`Target` and the values category `target`, where the names only differ
by case. The help parser finds the category in the list by the
case-insensitive name, so `slangc -h Target` and `slangc -h target` will
both print the `Target` help text and never the `target` help text.
This commit replaces the case-insensitive name search with a
case-sensitive one, and then only if the case-sensitive check fails do
we do a case-insensitive search.
That way, if the user uses `Target` they get the `Target` text, for
`target` they get the `target` text. If they use something like
`Capability`, a category that does not exist but whose name is
upper-case of the value category `capability`, they will still get the
help text for `capability` as before as a fallback.
---------
Co-authored-by: slangbot <ellieh+slangbot@nvidia.com>
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'tests/cpp-compiler/c-compile-error.c')
0 files changed, 0 insertions, 0 deletions
