[clang] [NFC][Clang] Use StringRef instead of string in ClangDiagnosticEmitter (PR #115959)

via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 12 15:52:02 PST 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 7b5e285d16090c2ddf4ee539c410d24bde52cbea cdcd09ec7c11a21da0804a6e886aff6410c42daf --extensions cpp -- clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
index 20b30261b7..9aab37514d 100644
--- a/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ b/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -92,6 +92,7 @@ namespace {
     const RecordKeeper &Records;
     StringMap<unsigned> CategoryIDs;
     std::vector<StringRef> CategoryStrings;
+
   public:
     DiagCategoryIDMap(const RecordKeeper &records) : Records(records) {
       DiagGroupParentMap ParentInfo(Records);

``````````

</details>


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


More information about the cfe-commits mailing list