/// after visiting other declarations.
bool VisitPreprocessorLast;
- /// \brief Whether we should visit the preprocessing record entries that are
- /// #included inside the \arg RegionOfInterest.
- bool VisitIncludedPreprocessingEntries;
+ /// \brief Whether we should visit declarations or preprocessing record
+ /// entries that are #included inside the \arg RegionOfInterest.
+ bool VisitIncludedEntities;
/// \brief When valid, a source range to which the cursor should restrict
/// its search.
: TU(TU), AU(static_cast<ASTUnit*>(TU->TUData)),
Visitor(Visitor), ClientData(ClientData),
VisitPreprocessorLast(VisitPreprocessorLast),
- VisitIncludedPreprocessingEntries(VisitIncludedPreprocessingEntries),
+ VisitIncludedEntities(VisitIncludedPreprocessingEntries),
RegionOfInterest(RegionOfInterest), DI_current(0)
{
Parent.kind = CXCursor_NoDeclFound;
bool visitPreprocessedEntitiesInRegion();
- bool shouldVisitIncludedPreprocessingEntries() const {
- return VisitIncludedPreprocessingEntries;
+ bool shouldVisitIncludedEntities() const {
+ return VisitIncludedEntities;
}
template<typename InputIterator>
SourceManager &SM = Visitor.getASTUnit()->getSourceManager();
FileID FID;
- if (!Visitor.shouldVisitIncludedPreprocessingEntries()) {
+ if (!Visitor.shouldVisitIncludedEntities()) {
// If the begin/end of the range lie in the same FileID, do the optimization
// where we skip preprocessed entities that do not come from the same FileID.
FID = SM.getFileID(R.getBegin());
CXCursor Parent = clang_getTranslationUnitCursor(TU);
CursorVisitor CursorVis(TU, GetCursorVisitor, &ResultData,
/*VisitPreprocessorLast=*/true,
- /*VisitIncludedPreprocessingEntries=*/false,
+ /*VisitIncludedEntities=*/false,
SourceLocation(SLoc));
CursorVis.VisitChildren(Parent);
}
AnnotateVis(tu,
AnnotateTokensVisitor, this,
/*VisitPreprocessorLast=*/true,
- /*VisitIncludedPreprocessingEntries=*/false,
+ /*VisitIncludedEntities=*/false,
RegionOfInterest),
SrcMgr(static_cast<ASTUnit*>(tu->TUData)->getSourceManager()),
HasContextSensitiveKeywords(false) { }
CursorVisitor MacroArgMarker(TU,
MarkMacroArgTokensVisitorDelegate, &Visitor,
/*VisitPreprocessorLast=*/true,
- /*VisitIncludedPreprocessingEntries=*/false,
+ /*VisitIncludedEntities=*/false,
RegionOfInterest);
MacroArgMarker.visitPreprocessedEntitiesInRegion();
}