HomePhabricator

[llvm] [CommandLine] Do not suggest really hidden opts in nearest lookup

Authored by mgorny on Jun 17 2020, 3:22 AM.

Description

[llvm] [CommandLine] Do not suggest really hidden opts in nearest lookup

Skip 'really hidden' options when performing lookup of the nearest
option when invalid option was passed. Since these options aren't even
documented in --help-hidden, it seems inconsistent to suggest them
to users.

This fixes clang-tools-extra test failures due to unexpected suggestions
when linking the tools to LLVM dylib (that provides more options than
the subset of LLVM libraries linked directly).

Differential Revision: https://reviews.llvm.org/D82001