[index] Print and test module import references.
llvm-svn: 262208
This commit is contained in:
@@ -107,6 +107,26 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool handleModuleOccurence(const ImportDecl *ImportD, SymbolRoleSet Roles,
|
||||
FileID FID, unsigned Offset) override {
|
||||
ASTContext &Ctx = ImportD->getASTContext();
|
||||
SourceManager &SM = Ctx.getSourceManager();
|
||||
|
||||
unsigned Line = SM.getLineNumber(FID, Offset);
|
||||
unsigned Col = SM.getColumnNumber(FID, Offset);
|
||||
OS << Line << ':' << Col << " | ";
|
||||
|
||||
printSymbolInfo(getSymbolInfo(ImportD), OS);
|
||||
OS << " | ";
|
||||
|
||||
OS << ImportD->getImportedModule()->getFullModuleName() << " | ";
|
||||
|
||||
printSymbolRoles(Roles, OS);
|
||||
OS << " |\n";
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
Reference in New Issue
Block a user