Although in C++ class name has external linkage, usually the definition of the
class is available in the same translation unit when it's needed. So we make
all of them invalid Entity.
llvm-svn: 107606
diff --git a/clang/lib/Index/Entity.cpp b/clang/lib/Index/Entity.cpp
index 0551ae5..06e22bbd 100644
--- a/clang/lib/Index/Entity.cpp
+++ b/clang/lib/Index/Entity.cpp
@@ -46,6 +46,7 @@
Entity VisitVarDecl(VarDecl *D);
Entity VisitFieldDecl(FieldDecl *D);
Entity VisitFunctionDecl(FunctionDecl *D);
+ Entity VisitTypeDecl(TypeDecl *D);
};
}
@@ -130,6 +131,13 @@
return Entity();
}
+Entity EntityGetter::VisitTypeDecl(TypeDecl *D) {
+ // Make TypeDecl an invalid Entity. Although in C++ class name has external
+ // linkage, usually the definition of the class is available in the same
+ // translation unit when it's needed. So we make all of them invalid Entity.
+ return Entity();
+}
+
//===----------------------------------------------------------------------===//
// EntityImpl Implementation
//===----------------------------------------------------------------------===//