Author: zhongxingxu
Date: Sun Jul  4 21:35:40 2010
New Revision: 107606

URL: http://llvm.org/viewvc/llvm-project?rev=107606&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Index/Entity.cpp

Modified: cfe/trunk/lib/Index/Entity.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/Entity.cpp?rev=107606&r1=107605&r2=107606&view=diff
==============================================================================
--- cfe/trunk/lib/Index/Entity.cpp (original)
+++ cfe/trunk/lib/Index/Entity.cpp Sun Jul  4 21:35:40 2010
@@ -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
 
//===----------------------------------------------------------------------===//


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to