[PATCH] D82001: [llvm] [CommandLine] Do not suggest really hidden opts in nearest lookup
Michał Górny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 06:58:45 PDT 2020
mgorny marked an inline comment as done.
mgorny added inline comments.
================
Comment at: llvm/lib/Support/CommandLine.cpp:595
Option *O = it->second;
+ // Do not suggest really hidden options (not shown in any help).
+ if (O->getOptionHiddenFlag() == ReallyHidden)
----------------
sammccall wrote:
> Rather than not considering them (and offering a worse option, which may be confusing) you might consider checking `Best` after the loop so we just offer no suggestion if the best one is hidden.
>
> Not sure which behavior is better, up to you.
The clang-tools-extra tests in question rely on having the 'next best' served.
I think the current behavior is more predictable, as adding new 'really hidden' options won't cause the current suggestions to suddenly disappear.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82001/new/
https://reviews.llvm.org/D82001
More information about the llvm-commits
mailing list