[llvm] Reland "[Support]Look up in top-level subcommand as a fallback when looking options for a custom subcommand (PR #71981)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 13:18:04 PST 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 237adfca4ef8d94b7d3d8817da615c5e5897c3da 1a86a5b4493f558b6d4e50aaea46d64539426aa2 -- llvm/lib/Support/CommandLine.cpp llvm/unittests/Support/CommandLineTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/unittests/Support/CommandLineTest.cpp b/llvm/unittests/Support/CommandLineTest.cpp
index b6542363dc61..381fe70b6b48 100644
--- a/llvm/unittests/Support/CommandLineTest.cpp
+++ b/llvm/unittests/Support/CommandLineTest.cpp
@@ -539,7 +539,7 @@ TEST(CommandLineTest, TopLevelOptInSubcommand) {
   // top-level options.  A valid use case is that users of llvm command line
   // tools should be able to specify top-level options defined in any library.
   StackOption<std::string> TopLevelOpt("str", cl::init("txt"),
-                                   cl::desc("A top-level option."));
+                                       cl::desc("A top-level option."));
 
   StackSubCommand SC("sc", "Subcommand");
   StackOption<std::string> PositionalOpt(

``````````

</details>


https://github.com/llvm/llvm-project/pull/71981


More information about the llvm-commits mailing list