[llvm] [NFC][Support] Create helper function to parse bool. (PR #102818)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 11 08:10:50 PDT 2024


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 5286656609418c766272ff78e62fda41671ef4cb f2de3bbfa2ecbc97341c6e5aa63d2f09f91c9d66 --extensions cpp -- llvm/lib/Support/CommandLine.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index a5f1c069d0..2ef2e58b65 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -400,7 +400,7 @@ private:
   SubCommand *LookupSubCommand(StringRef Name, std::string &NearestString);
 };
 
-template < typename T, T TrueVal, T FalseVal>
+template <typename T, T TrueVal, T FalseVal>
 bool parseBool(Option &O, StringRef ArgName, StringRef Arg, T &Value) {
   if (Arg == "" || Arg == "true" || Arg == "TRUE" || Arg == "True" ||
       Arg == "1") {

``````````

</details>


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


More information about the llvm-commits mailing list