r176681 - [libclang] When calling the function of CXCursorAndRangeVisitor, don't forget to
Argyrios Kyrtzidis
akyrtzi at gmail.com
Thu Mar 7 18:32:29 PST 2013
Author: akirtzidis
Date: Thu Mar 7 20:32:29 2013
New Revision: 176681
URL: http://llvm.org/viewvc/llvm-project?rev=176681&view=rev
Log:
[libclang] When calling the function of CXCursorAndRangeVisitor, don't forget to
stop visitation if it returns CXVisit_Break.
Modified:
cfe/trunk/tools/libclang/CIndexHigh.cpp
Modified: cfe/trunk/tools/libclang/CIndexHigh.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexHigh.cpp?rev=176681&r1=176680&r2=176681&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexHigh.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexHigh.cpp Thu Mar 7 20:32:29 2013
@@ -205,8 +205,9 @@ static enum CXChildVisitResult findFileI
return CXChildVisit_Recurse;
}
- data->visitor.visit(data->visitor.context, cursor,
- cxloc::translateSourceRange(Ctx, Loc));
+ if (data->visitor.visit(data->visitor.context, cursor,
+ cxloc::translateSourceRange(Ctx, Loc)) == CXVisit_Break)
+ return CXChildVisit_Break;
}
return CXChildVisit_Recurse;
}
@@ -300,8 +301,9 @@ static enum CXChildVisitResult findFileM
return CXChildVisit_Continue;
}
- data->visitor.visit(data->visitor.context, cursor,
- cxloc::translateSourceRange(Ctx, Loc));
+ if (data->visitor.visit(data->visitor.context, cursor,
+ cxloc::translateSourceRange(Ctx, Loc)) == CXVisit_Break)
+ return CXChildVisit_Break;
return CXChildVisit_Continue;
}
More information about the cfe-commits
mailing list