[llvm] [clang] Deduplicate the logic between StringMapEntry.first() and StringMapEntry.getKey() (PR #113735)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 13:09:30 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 6c9bbbc818ae8a0d2849dbc1ebd84a220cc27d20 cf1ff225026cce406fb54f6e11514dcf61ca8def --extensions h -- llvm/include/llvm/ADT/StringMapEntry.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/ADT/StringMapEntry.h b/llvm/include/llvm/ADT/StringMapEntry.h
index a3ff241586..d93af5aedc 100644
--- a/llvm/include/llvm/ADT/StringMapEntry.h
+++ b/llvm/include/llvm/ADT/StringMapEntry.h
@@ -116,9 +116,7 @@ public:
return reinterpret_cast<const char *>(this + 1);
}
- StringRef first() const {
- return getKey();
- }
+ StringRef first() const { return getKey(); }
/// Create a StringMapEntry for the specified key construct the value using
/// \p InitiVals.
``````````
</details>
https://github.com/llvm/llvm-project/pull/113735
More information about the llvm-commits
mailing list