aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/TargetParserTest.cpp
diff options
context:
space:
mode:
authorLuca Di Sera <disera.luca@gmail.com>2022-11-14 15:17:22 +0100
committerLuca Di Sera <disera.luca@gmail.com>2022-11-14 15:21:36 +0100
commit5c67cf0a7fdc00c9b9c55578b770e768f5618bed (patch)
tree1c2e01bb61e88c8fdee0ca303017ee3354e4b3e1 /llvm/unittests/Support/TargetParserTest.cpp
parent47eddbbf33fe3b020e1fc4ef272461b8533238f8 (diff)
downloadllvm-5c67cf0a7fdc00c9b9c55578b770e768f5618bed.zip
llvm-5c67cf0a7fdc00c9b9c55578b770e768f5618bed.tar.gz
llvm-5c67cf0a7fdc00c9b9c55578b770e768f5618bed.tar.bz2
Add clang_CXXMethod_isMoveAssignmentOperator to libclang
The new method is a wrapper of `CXXMethodDecl::isMoveAssignmentOperator` and can be used to recognized move-assignment operators in libclang. An export for the function, together with its documentation, was added to "clang/include/clang-c/Index.h" with an implementation provided in "clang/tools/libclang/CIndex.cpp". The implementation was based on similar `clang_CXXMethod.*` implementations, following the same structure but calling `CXXMethodDecl::isMoveAssignmentOperator` for its main logic. The new symbol was further added to "clang/tools/libclang/libclang.map" to be exported, under the LLVM16 tag. "clang/tools/c-index-test/c-index-test.c" was modified to print a specific tag, "(move-assignment operator)", for cursors that are recognized by `clang_CXXMethod_isMoveAssignmentOperator`. A new regression test file, "clang/test/Index/move-assignment-operator.cpp", was added to ensure whether the correct constructs were recognized or not by the new function. The "clang/test/Index/get-cursor.cpp" regression test file was updated as it was affected by the new "(move-assignment operator)" tag. A binding for the new function was added to libclang's python's bindings, in "clang/bindings/python/clang/cindex.py", adding a new method for `Cursor`, `is_move_assignment_operator_method`. An accompanying test was added to `clang/bindings/python/tests/cindex/test_cursor.py`, testing the new function with the same methodology as the corresponding libclang test. The current release note, `clang/docs/ReleaseNotes.rst`, was modified to report the new addition under the "libclang" section. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D137246
Diffstat (limited to 'llvm/unittests/Support/TargetParserTest.cpp')
0 files changed, 0 insertions, 0 deletions