diff options
author | Alex Lorenz <arphaman@gmail.com> | 2017-06-22 11:20:07 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2017-06-22 11:20:07 +0000 |
commit | b6e03aa967d13545470e43441332c35f582a5875 (patch) | |
tree | 451d8217868dee20b4490a270595457a6d252b84 /clang/test/Index/Core/index-source.cpp | |
parent | 1c73fcc131de7b62e55c3f0e8da95e47779d2826 (diff) | |
download | bcm5719-llvm-b6e03aa967d13545470e43441332c35f582a5875.tar.gz bcm5719-llvm-b6e03aa967d13545470e43441332c35f582a5875.zip |
[index] Add the "SpecializationOf" relation to the forward declarations
of class template specializations
This commit fixes an issue where a forward declaration of a class template
specialization was not related to the base template. We need to relate even
forward declarations because specializations don't have to be defined.
rdar://32869409
Differential Revision: https://reviews.llvm.org/D34462
llvm-svn: 305996
Diffstat (limited to 'clang/test/Index/Core/index-source.cpp')
-rw-r--r-- | clang/test/Index/Core/index-source.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/test/Index/Core/index-source.cpp b/clang/test/Index/Core/index-source.cpp index 76fdc551c00..6d20fdd48e5 100644 --- a/clang/test/Index/Core/index-source.cpp +++ b/clang/test/Index/Core/index-source.cpp @@ -282,7 +282,9 @@ class SpecializationDecl { }; template<> class SpecializationDecl<int>; -// CHECK: [[@LINE-1]]:7 | class(Gen)/C++ | SpecializationDecl | c:@ST>1#T@SpecializationDecl | <no-cgname> | Ref | rel: 0 +// CHECK: [[@LINE-1]]:7 | class(Gen,TS)/C++ | SpecializationDecl | c:@S@SpecializationDecl>#I | <no-cgname> | Decl,RelSpecialization | rel: 1 +// CHECK-NEXT: RelSpecialization | SpecializationDecl | c:@ST>1#T@SpecializationDecl +// CHECK: [[@LINE-3]]:7 | class(Gen)/C++ | SpecializationDecl | c:@ST>1#T@SpecializationDecl | <no-cgname> | Ref | rel: 0 template<> class SpecializationDecl<int> { }; @@ -292,8 +294,10 @@ class SpecializationDecl<int> { }; template<typename T> class PartialSpecilizationClass<Cls, T>; -// CHECK: [[@LINE-1]]:7 | class(Gen)/C++ | PartialSpecilizationClass | c:@ST>2#T#T@PartialSpecilizationClass | <no-cgname> | Ref | rel: 0 -// CHECK-NEXT: [[@LINE-2]]:33 | class/C++ | Cls | c:@S@Cls | <no-cgname> | Ref | rel: 0 +// CHECK: [[@LINE-1]]:7 | class(Gen,TPS)/C++ | PartialSpecilizationClass | c:@SP>1#T@PartialSpecilizationClass>#$@S@Cls#t0.0 | <no-cgname> | Decl,RelSpecialization | rel: 1 +// CHECK-NEXT: RelSpecialization | PartialSpecilizationClass | c:@ST>2#T#T@PartialSpecilizationClass +// CHECK: [[@LINE-3]]:7 | class(Gen)/C++ | PartialSpecilizationClass | c:@ST>2#T#T@PartialSpecilizationClass | <no-cgname> | Ref | rel: 0 +// CHECK-NEXT: [[@LINE-4]]:33 | class/C++ | Cls | c:@S@Cls | <no-cgname> | Ref | rel: 0 template<> class PartialSpecilizationClass<Cls, Cls> : Cls { }; |