diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2017-04-21 05:42:40 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2017-04-21 05:42:40 +0000 |
commit | 4802bbed82dedaca155c62f3c6c10bfa25fea3aa (patch) | |
tree | ba3b5b67fc0f12c303a67514a44653b956cbc3fe | |
parent | 12b885c4eef333208b1af6497841354db36ca3d1 (diff) |
[index] For 'transparent' tag typedefs, ignore their tag reference
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300948 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Index/IndexDecl.cpp | 5 | ||||
-rw-r--r-- | test/Index/Core/index-source.m | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/Index/IndexDecl.cpp b/lib/Index/IndexDecl.cpp index 0e89350551..9bf19270e8 100644 --- a/lib/Index/IndexDecl.cpp +++ b/lib/Index/IndexDecl.cpp @@ -231,10 +231,11 @@ public: } bool VisitTypedefNameDecl(const TypedefNameDecl *D) { - if (!D->isTransparentTag()) + if (!D->isTransparentTag()) { if (!IndexCtx.handleDecl(D)) return false; - IndexCtx.indexTypeSourceInfo(D->getTypeSourceInfo(), D); + IndexCtx.indexTypeSourceInfo(D->getTypeSourceInfo(), D); + } return true; } diff --git a/test/Index/Core/index-source.m b/test/Index/Core/index-source.m index f48891417f..a2eef89dee 100644 --- a/test/Index/Core/index-source.m +++ b/test/Index/Core/index-source.m @@ -353,7 +353,8 @@ typedef MyGenCls<Base *><MyEnumerating> MyEnumerator; typedef NS_ENUM(AnotherEnum, int) { // CHECK-NOT: [[@LINE-1]]:17 | type-alias/C | AnotherEnum | -// CHECK: [[@LINE-2]]:17 | enum/C | AnotherEnum | [[AnotherEnum_USR:.*]] | {{.*}} | Ref,RelCont | rel: 1 +// CHECK-NOT: [[@LINE-2]]:17 | {{.*}} | Ref +// CHECK: [[@LINE-3]]:17 | enum/C | AnotherEnum | [[AnotherEnum_USR:.*]] | {{.*}} | Def | rel: 0 AnotherEnumFirst = 0, AnotherEnumSecond = 1, AnotherEnumThird = 2, |