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, 2 insertions, 5 deletions
diff --git a/clang/tools/libclang/IndexingContext.cpp b/clang/tools/libclang/IndexingContext.cpp
index 3d70144db54..a124cbdff52 100644
--- a/clang/tools/libclang/IndexingContext.cpp
+++ b/clang/tools/libclang/IndexingContext.cpp
@@ -814,12 +814,9 @@ void IndexingContext::getEntityInfo(const NamedDecl *D,
EntityInfo.kind = CXIdxEntity_Enum; break;
}
- if (const CXXRecordDecl *CXXRec = dyn_cast<CXXRecordDecl>(D)) {
- // FIXME: isPOD check is not sufficient, a POD can contain methods,
- // we want a isCStructLike check.
- if (CXXRec->hasDefinition() && !CXXRec->isPOD())
+ if (const CXXRecordDecl *CXXRec = dyn_cast<CXXRecordDecl>(D))
+ if (!CXXRec->isCLike())
EntityInfo.lang = CXIdxEntityLang_CXX;
- }
if (isa<ClassTemplatePartialSpecializationDecl>(D)) {
EntityInfo.templateKind = CXIdxEntity_TemplatePartialSpecialization;
OpenPOWER on IntegriCloud