[clang] [libclang] Add API to query more information about base classes. (PR #120300)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 10 05:59:09 PST 2025
================
@@ -27,6 +27,33 @@ unsigned clang_isVirtualBase(CXCursor C) {
return B->isVirtual();
}
+unsigned clang_visitCXXBaseClasses(CXType PT, CXFieldVisitor visitor,
+ CXClientData client_data) {
+ CXCursor PC = clang_getTypeDeclaration(PT);
+ if (clang_isInvalid(PC.kind))
+ return false;
+ const CXXRecordDecl *RD =
+ dyn_cast_or_null<CXXRecordDecl>(cxcursor::getCursorDecl(PC));
----------------
AaronBallman wrote:
Yup, the `or_null` variants are deprecated in favor of the `is_present` ones.
https://github.com/llvm/llvm-project/pull/120300
More information about the cfe-commits
mailing list