[clang-tools-extra] [clang-doc][nfc] Avoid constructing SmallString in ToString method (PR #96921)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 28 16:20:39 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 e55aa027f813679ca63c9b803690ce792a3d7b28 f48c15c8a6e8fb992a2089fcd95e51dc32a76375 -- clang-tools-extra/clang-doc/HTMLGenerator.cpp
``````````

</details>

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

``````````diff
diff --git a/clang-tools-extra/clang-doc/HTMLGenerator.cpp b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
index 8b24cece84..d4a5ad1b67 100644
--- a/clang-tools-extra/clang-doc/HTMLGenerator.cpp
+++ b/clang-tools-extra/clang-doc/HTMLGenerator.cpp
@@ -56,7 +56,7 @@ public:
   operator bool() = delete;
 
   bool isSelfClosing() const;
-  const char* c_str() const;
+  const char *c_str() const;
 
 private:
   TagType Value;
@@ -137,7 +137,7 @@ bool HTMLTag::isSelfClosing() const {
   llvm_unreachable("Unhandled HTMLTag::TagType");
 }
 
-const char* HTMLTag::c_str() const {
+const char *HTMLTag::c_str() const {
   switch (Value) {
   case HTMLTag::TAG_A:
     return "a";

``````````

</details>


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


More information about the cfe-commits mailing list