[clang] Remove duplicate API (PR #132776)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 24 09:47:43 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 1f967887018c63bddf5bf2860e0e6a3aa1e85840 ad58171d90be5e93c33c54f87f8c35096d13e680 --extensions c,h,cpp -- clang/include/clang-c/Index.h clang/tools/c-index-test/c-index-test.c clang/tools/libclang/CIndex.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index e091d89c32..4008d11842 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -5442,8 +5442,8 @@ CXString clang_getCursorSpelling(CXCursor C) {
if (C.kind == CXCursor_BinaryOperator ||
C.kind == CXCursor_CompoundAssignOperator) {
- return clang_getBinaryOperatorKindSpelling
- (clang_getCursorBinaryOperatorKind(C));
+ return clang_getBinaryOperatorKindSpelling(
+ clang_getCursorBinaryOperatorKind(C));
}
const Decl *D = getDeclFromExpr(getCursorExpr(C));
@@ -10083,10 +10083,10 @@ cxindex::Logger::~Logger() {
}
CXString clang_getBinaryOperatorKindSpelling(enum CXBinaryOperatorKind kind) {
- if (kind > CXBinaryOperator_Last)
+ if (kind > CXBinaryOperator_Last)
return cxstring::createEmpty();
- return cxstring::createDup(
+ return cxstring::createDup(
BinaryOperator::getOpcodeStr(static_cast<BinaryOperatorKind>(kind - 1)));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/132776
More information about the cfe-commits
mailing list