[libclang] Handle AttributedTypeLoc for cursor visitation. Fixes rdar://9535717.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137634 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index cd4467c..bd3cac3 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -348,6 +348,7 @@
bool VisitMemberPointerTypeLoc(MemberPointerTypeLoc TL);
bool VisitLValueReferenceTypeLoc(LValueReferenceTypeLoc TL);
bool VisitRValueReferenceTypeLoc(RValueReferenceTypeLoc TL);
+ bool VisitAttributedTypeLoc(AttributedTypeLoc TL);
bool VisitFunctionTypeLoc(FunctionTypeLoc TL, bool SkipResultType = false);
bool VisitArrayTypeLoc(ArrayTypeLoc TL);
bool VisitTemplateSpecializationTypeLoc(TemplateSpecializationTypeLoc TL);
@@ -1521,6 +1522,10 @@
return Visit(TL.getPointeeLoc());
}
+bool CursorVisitor::VisitAttributedTypeLoc(AttributedTypeLoc TL) {
+ return Visit(TL.getModifiedLoc());
+}
+
bool CursorVisitor::VisitFunctionTypeLoc(FunctionTypeLoc TL,
bool SkipResultType) {
if (!SkipResultType && Visit(TL.getResultLoc()))