[clang] [clang][TableGen] Fix Duplicate Entries in TableGen (PR #140828)

via cfe-commits cfe-commits at lists.llvm.org
Tue May 20 19:21:42 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 cpp -- clang/test/AST/ast-dump-riscv-attributes.cpp clang/utils/TableGen/ClangAttrEmitter.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index d2b873adf..05580716d 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -3669,9 +3669,9 @@ static void GenerateHasAttrSpellingStringSwitch(
     ArrayRef<std::pair<const Record *, FlattenedSpelling>> Attrs,
     raw_ostream &OS, StringRef Variety, StringRef Scope = "") {
 
-  // It turns out that there are duplicate records for a given spelling. This map
-  // combines matching test strings using '||'. For example, if there are three
-  // conditions A, B, and C, the final result will be: A || B || C.
+  // It turns out that there are duplicate records for a given spelling. This
+  // map combines matching test strings using '||'. For example, if there are
+  // three conditions A, B, and C, the final result will be: A || B || C.
   llvm::StringMap<std::string> TestStringMap;
 
   for (const auto &[Attr, Spelling] : Attrs) {

``````````

</details>


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


More information about the cfe-commits mailing list