summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/c-index-test')
-rw-r--r--clang/tools/c-index-test/core_main.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/core_main.cpp b/clang/tools/c-index-test/core_main.cpp
index e72b9f93efd..1881e31e207 100644
--- a/clang/tools/c-index-test/core_main.cpp
+++ b/clang/tools/c-index-test/core_main.cpp
@@ -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
OpenPOWER on IntegriCloud