summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/IndexingContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/IndexingContext.cpp')
-rw-r--r--clang/tools/libclang/IndexingContext.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp
index b5da6461bce..f5977971324 100644
--- a/clang/tools/libclang/IndexingContext.cpp
+++ b/clang/tools/libclang/IndexingContext.cpp
@@ -736,7 +736,12 @@ void IndexingContext::getEntityInfo(const NamedDecl *D,
EntityInfo.kind = CXIdxEntity_CXXStaticVariable;
break;
case Decl::Field:
- EntityInfo.kind = CXIdxEntity_Field; break;
+ EntityInfo.kind = CXIdxEntity_Field;
+ if (const CXXRecordDecl *
+ CXXRec = dyn_cast<CXXRecordDecl>(D->getDeclContext()))
+ if (!CXXRec->isPOD())
+ EntityInfo.kind = CXIdxEntity_CXXInstanceVariable;
+ break;
case Decl::EnumConstant:
EntityInfo.kind = CXIdxEntity_EnumConstant; break;
case Decl::ObjCInterface:
OpenPOWER on IntegriCloud