diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-07-05 02:35:40 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-07-05 02:35:40 +0000 |
commit | c8822e06d0420afb8e315ad82566d6c1173ad02f (patch) | |
tree | 4b587300c47f55e0ee119ca96a4067e9ef76d6f8 /lib/Index/Entity.cpp | |
parent | 423030c9e73ac8c21b747dc019c192bc5041c848 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Index/Entity.cpp')
-rw-r--r-- | lib/Index/Entity.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Index/Entity.cpp b/lib/Index/Entity.cpp index 0551ae537a..06e22bbd04 100644 --- a/lib/Index/Entity.cpp +++ b/lib/Index/Entity.cpp @@ -46,6 +46,7 @@ public: Entity VisitVarDecl(VarDecl *D); Entity VisitFieldDecl(FieldDecl *D); Entity VisitFunctionDecl(FunctionDecl *D); + Entity VisitTypeDecl(TypeDecl *D); }; } @@ -130,6 +131,13 @@ Entity EntityGetter::VisitFieldDecl(FieldDecl *D) { 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 //===----------------------------------------------------------------------===// |