aboutsummaryrefslogtreecommitdiff
path: root/tools/CIndex/CIndex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/CIndex/CIndex.cpp')
-rw-r--r--tools/CIndex/CIndex.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index dc44fd2b1c..4c1cac9812 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -43,10 +43,10 @@ CXTranslationUnit clang_createTranslationUnit(
return ASTUnit::LoadFromPCHFile(astName, CXXIdx->getFileManager(), &ErrMsg);
}
+namespace {
+
class IdxVisitor : public DeclVisitor<IdxVisitor> {
public:
- IdxVisitor();
-
void VisitNamedDecl(NamedDecl *ND) {
printf("NamedDecl (%s:", ND->getDeclKindName());
if (ND->getIdentifier())
@@ -56,6 +56,8 @@ public:
}
};
+}
+
void clang_loadTranslationUnit(
CXTranslationUnit CTUnit, void (*callback)(CXTranslationUnit, CXCursor))
{