summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
-rw-r--r--clang/tools/libclang/CIndex.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 96923dc7def..be53b822744 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -6888,6 +6888,16 @@ CXFile clang_Module_getTopLevelHeader(CXTranslationUnit TU,
//===----------------------------------------------------------------------===//
extern "C" {
+unsigned clang_CXXField_isMutable(CXCursor C) {
+ if (!clang_isDeclaration(C.kind))
+ return 0;
+
+ if (const auto D = cxcursor::getCursorDecl(C))
+ if (const auto FD = dyn_cast_or_null<FieldDecl>(D))
+ return FD->isMutable() ? 1 : 0;
+ return 0;
+}
+
unsigned clang_CXXMethod_isPureVirtual(CXCursor C) {
if (!clang_isDeclaration(C.kind))
return 0;
OpenPOWER on IntegriCloud