[clang] Retrieve BinaryOperator::getOpcode and BinaryOperator::getOpcodeStr via libclang and its python interface (PR #98489)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 12 04:44:51 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 a4cdd94ed0afe76854f837ce3c49c74e712d721d 39b7b5a6af4fc7801ce98e33f802a2e17c29cd9b --extensions h,c,cpp -- clang/test/Index/binop.cpp clang/include/clang-c/Index.h clang/test/Index/blocks.c clang/test/Index/index-concepts.cpp clang/test/Index/load-staticassert.cpp clang/test/Index/nested-binaryoperators.cpp clang/test/Index/preamble.c clang/test/Index/print-type.c clang/test/Index/print-type.cpp clang/test/Index/recursive-cxx-member-calls.cpp clang/test/Index/remap-load.c 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 a301e06ae4..e53e64e49d 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -8986,7 +8986,8 @@ CXString clang_Cursor_getBinaryOpcodeStr(enum CX_BinaryOperatorKind Op) {
return cxstring::createEmpty();
return cxstring::createDup(
- // BinaryOperator::getOpcodeStr has no case for CX_BO_Invalid, so subtract 1
+ // BinaryOperator::getOpcodeStr has no case for CX_BO_Invalid, so subtract
+ // 1
BinaryOperator::getOpcodeStr(static_cast<BinaryOperatorKind>(Op - 1)));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/98489
More information about the cfe-commits
mailing list