diff options
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r-- | tools/libclang/CIndex.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 656df9b09b..f4d347108c 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -7919,6 +7919,17 @@ unsigned clang_CXXMethod_isVirtual(CXCursor C) { return (Method && Method->isVirtual()) ? 1 : 0; } +unsigned clang_CXXRecord_isAbstract(CXCursor C) { + if (!clang_isDeclaration(C.kind)) + return 0; + + const auto *D = cxcursor::getCursorDecl(C); + const auto *RD = dyn_cast_or_null<CXXRecordDecl>(D); + if (RD) + RD = RD->getDefinition(); + return (RD && RD->isAbstract()) ? 1 : 0; +} + unsigned clang_EnumDecl_isScoped(CXCursor C) { if (!clang_isDeclaration(C.kind)) return 0; |