[llvm] [llvm] specialize cl::opt_storage for std::string (PR #149172)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 12:56:44 PDT 2025


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 HEAD~1 HEAD --extensions h -- llvm/include/llvm/Support/CommandLine.h llvm/include/llvm/TargetParser/Triple.h
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 2e2698071..ab16c491e 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -1523,14 +1523,14 @@ public:
 
   char operator[](size_t pos) const { return Value.at(pos); }
 
-  char& at(size_t pos) { return Value[pos]; }
-  const char& at(size_t pos) const { return Value.at(pos); }
+  char &at(size_t pos) { return Value[pos]; }
+  const char &at(size_t pos) const { return Value.at(pos); }
 
-  char& front() { return Value.front(); }
-  const char& front() const { return Value.front(); }
+  char &front() { return Value.front(); }
+  const char &front() const { return Value.front(); }
 
-  char& back() { return Value.back(); }
-  const char& back() const { return Value.back(); }
+  char &back() { return Value.back(); }
+  const char &back() const { return Value.back(); }
 };
 
 // Define a partial specialization to handle things we cannot inherit from.  In

``````````

</details>


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


More information about the llvm-commits mailing list