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.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index a2467ebad4a..df0ed2ad65d 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -916,6 +916,18 @@ bool CursorVisitor::VisitTemplateTemplateParmDecl(TemplateTemplateParmDecl *D) {
return false;
}
+bool CursorVisitor::VisitObjCTypeParamDecl(ObjCTypeParamDecl *D) {
+ // Visit the bound, if it's explicit.
+ if (D->hasExplicitBound()) {
+ if (auto TInfo = D->getTypeSourceInfo()) {
+ if (Visit(TInfo->getTypeLoc()))
+ return true;
+ }
+ }
+
+ return false;
+}
+
bool CursorVisitor::VisitObjCMethodDecl(ObjCMethodDecl *ND) {
if (TypeSourceInfo *TSInfo = ND->getReturnTypeSourceInfo())
if (Visit(TSInfo->getTypeLoc()))
@@ -1091,14 +1103,6 @@ bool CursorVisitor::VisitObjCTypeParamList(ObjCTypeParamList *typeParamList) {
// Visit the type parameter.
if (Visit(MakeCXCursor(typeParam, TU, RegionOfInterest)))
return true;
-
- // Visit the bound, if it's explicit.
- if (typeParam->hasExplicitBound()) {
- if (auto TInfo = typeParam->getTypeSourceInfo()) {
- if (Visit(TInfo->getTypeLoc()))
- return true;
- }
- }
}
return false;
OpenPOWER on IntegriCloud