vedgy added inline comments.
================ Comment at: clang/tools/libclang/CXType.cpp:374 +unsigned clang_isBitFieldDecl(CXCursor C) { + using namespace cxcursor; ---------------- vedgy wrote: > I just noticed the `clang_Cursor_isBitField()` function implemented [[ > https://github.com/llvm/llvm-project/commit/e822f58db4dee2ae56e306512288224979b9b5ba > | 10 years ago ]] , which returns exactly the same value as this new > function. So most changes in this commit can be reverted. `clang_Cursor_isBitField()` is declared much later in //Index.h// and isn't easily discoverable. `clang_getFieldDeclBitWidth()` could benefit from a usage example. Here is how I plan to use it in KDevelop: ``` if (clang_Cursor_isBitField(cursor)) { const auto bitWidth = clang_getFieldDeclBitWidth(cursor); decl->setBitWidth(bitWidth == -1 ? ClassMemberDeclaration::ValueDependentBitWidth : bitWidth); } ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130303/new/ https://reviews.llvm.org/D130303 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits