aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/clangparser
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/clangparser')
-rw-r--r--sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
index b2dd7c844..af7f96068 100644
--- a/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
+++ b/sources/shiboken2/ApiExtractor/clangparser/clangbuilder.cpp
@@ -260,6 +260,18 @@ FunctionModelItem BuilderPrivate::createFunction(const CXCursor &cursor,
result->setFunctionType(t);
result->setScope(m_scope);
result->setStatic(clang_Cursor_getStorageClass(cursor) == CX_SC_Static);
+ switch (clang_getCursorAvailability(cursor)) {
+ case CXAvailability_Available:
+ break;
+ case CXAvailability_Deprecated:
+ result->setDeprecated(true);
+ break;
+ case CXAvailability_NotAvailable: // "Foo(const Foo&) = delete;"
+ result->setDeleted(true);
+ break;
+ case CXAvailability_NotAccessible:
+ break;
+ }
return result;
}