[clang] [libclang] Add API to query more information about base classes. (PR #120300)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 10 05:50:46 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));
----------------
erichkeane wrote:
are we supposed to be using the `if_present` versions or not?
https://github.com/llvm/llvm-project/pull/120300
More information about the cfe-commits
mailing list