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 | 74458782cc5b5ebb7ecbe5f0dbc02654b3a3338a (patch) | |
tree | b7cc453e9d4139d08ad7dc02a6fd13e06d2deb65 /clang/lib/Index/Entity.cpp | |
parent | 57012ee70db3deff05ab98b493bea308d8d97555 (diff) | |
download | bcm5719-llvm-74458782cc5b5ebb7ecbe5f0dbc02654b3a3338a.tar.gz bcm5719-llvm-74458782cc5b5ebb7ecbe5f0dbc02654b3a3338a.zip |
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
Diffstat (limited to 'clang/lib/Index/Entity.cpp')
-rw-r--r-- | clang/lib/Index/Entity.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Index/Entity.cpp b/clang/lib/Index/Entity.cpp index 0551ae537a9..06e22bbd043 100644 --- a/clang/lib/Index/Entity.cpp +++ b/clang/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 //===----------------------------------------------------------------------===// |