diff options
Diffstat (limited to 'clang/lib/Index/IndexSymbol.cpp')
-rw-r--r-- | clang/lib/Index/IndexSymbol.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Index/IndexSymbol.cpp b/clang/lib/Index/IndexSymbol.cpp index 65f5241037c..d98d7c07243 100644 --- a/clang/lib/Index/IndexSymbol.cpp +++ b/clang/lib/Index/IndexSymbol.cpp @@ -74,9 +74,14 @@ SymbolInfo index::getSymbolInfo(const Decl *D) { Info.Kind = SymbolKind::Enum; break; } - if (const CXXRecordDecl *CXXRec = dyn_cast<CXXRecordDecl>(D)) - if (!CXXRec->isCLike()) + if (const CXXRecordDecl *CXXRec = dyn_cast<CXXRecordDecl>(D)) { + if (!CXXRec->isCLike()) { Info.Lang = SymbolLanguage::CXX; + if (CXXRec->getDescribedClassTemplate()) { + Info.SubKinds |= (unsigned)SymbolSubKind::Generic; + } + } + } if (isa<ClassTemplatePartialSpecializationDecl>(D)) { Info.SubKinds |= (unsigned)SymbolSubKind::Generic; |