summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/IndexSymbol.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2016-11-07 21:20:08 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2016-11-07 21:20:08 +0000
commit3e5b61f7dad2e9165b2f0c169e3ea6da26f3c987 (patch)
tree3edf3cf1c67efcfa638dca4acafe5f0cfea41a0d /clang/lib/Index/IndexSymbol.cpp
parentaaae302c5afe13d089ec9fbace99a3ef0ddb014d (diff)
downloadbcm5719-llvm-3e5b61f7dad2e9165b2f0c169e3ea6da26f3c987.tar.gz
bcm5719-llvm-3e5b61f7dad2e9165b2f0c169e3ea6da26f3c987.zip
[index] Make sure to mark class template symbols as having 'generic' sub-kind.
llvm-svn: 286153
Diffstat (limited to 'clang/lib/Index/IndexSymbol.cpp')
-rw-r--r--clang/lib/Index/IndexSymbol.cpp9
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;
OpenPOWER on IntegriCloud