From 03c39bf6c0bff106cc2b0f31b7c9249b23c205fe Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Mon, 8 Dec 2014 08:48:33 +0000 Subject: [PATCH] [libclang] Use same USR encoding for 'class' as 'struct'. 'class' and 'struct' can be used interchangebly for forward references. Use the same encoding otherwise we may get into a weird situation where the USR for the same declaration is different based on whether the definition of the tag reference is visible or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223632 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Index/USRGeneration.cpp | 6 +-- test/Index/comment-to-html-xml-conversion.cpp | 40 +++++++------- test/Index/cxx11-lambdas.cpp | 2 +- test/Index/index-templates.cpp | 16 +++--- test/Index/usrs-cxx0x.cpp | 6 +-- test/Index/usrs.cpp | 52 +++++++++---------- 6 files changed, 61 insertions(+), 61 deletions(-) diff --git a/lib/Index/USRGeneration.cpp b/lib/Index/USRGeneration.cpp index a41da8ae3e..ad092a20ed 100644 --- a/lib/Index/USRGeneration.cpp +++ b/lib/Index/USRGeneration.cpp @@ -430,8 +430,8 @@ void USRGenerator::VisitTagDecl(const TagDecl *D) { switch (D->getTagKind()) { case TTK_Interface: + case TTK_Class: case TTK_Struct: Out << "@ST"; break; - case TTK_Class: Out << "@CT"; break; case TTK_Union: Out << "@UT"; break; case TTK_Enum: llvm_unreachable("enum template"); } @@ -442,8 +442,8 @@ void USRGenerator::VisitTagDecl(const TagDecl *D) { switch (D->getTagKind()) { case TTK_Interface: + case TTK_Class: case TTK_Struct: Out << "@SP"; break; - case TTK_Class: Out << "@CP"; break; case TTK_Union: Out << "@UP"; break; case TTK_Enum: llvm_unreachable("enum partial specialization"); } @@ -454,8 +454,8 @@ void USRGenerator::VisitTagDecl(const TagDecl *D) { if (!AlreadyStarted) { switch (D->getTagKind()) { case TTK_Interface: + case TTK_Class: case TTK_Struct: Out << "@S"; break; - case TTK_Class: Out << "@C"; break; case TTK_Union: Out << "@U"; break; case TTK_Enum: Out << "@E"; break; } diff --git a/test/Index/comment-to-html-xml-conversion.cpp b/test/Index/comment-to-html-xml-conversion.cpp index 33d70a06dd..f31061aa12 100644 --- a/test/Index/comment-to-html-xml-conversion.cpp +++ b/test/Index/comment-to-html-xml-conversion.cpp @@ -736,47 +736,47 @@ void comment_to_html_conversion_36(); /// Aaa. class comment_to_xml_conversion_01 { -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_01c:@C@comment_to_xml_conversion_01class comment_to_xml_conversion_01 {} Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_01c:@S@comment_to_xml_conversion_01class comment_to_xml_conversion_01 {} Aaa.] /// \param aaa Blah blah. comment_to_xml_conversion_01(int aaa); -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConstructor=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_01c:@C@comment_to_xml_conversion_01@F@comment_to_xml_conversion_01#I#comment_to_xml_conversion_01(int aaa)aaa0in Blah blah.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConstructor=comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_01c:@S@comment_to_xml_conversion_01@F@comment_to_xml_conversion_01#I#comment_to_xml_conversion_01(int aaa)aaa0in Blah blah.] /// Aaa. ~comment_to_xml_conversion_01(); -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXDestructor=~comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[~comment_to_xml_conversion_01c:@C@comment_to_xml_conversion_01@F@~comment_to_xml_conversion_01#~comment_to_xml_conversion_01() Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXDestructor=~comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[~comment_to_xml_conversion_01c:@S@comment_to_xml_conversion_01@F@~comment_to_xml_conversion_01#~comment_to_xml_conversion_01() Aaa.] /// \param aaa Blah blah. int comment_to_xml_conversion_02(int aaa); -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: CXXMethod=comment_to_xml_conversion_02:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_02c:@C@comment_to_xml_conversion_01@F@comment_to_xml_conversion_02#I#int comment_to_xml_conversion_02(int aaa)aaa0in Blah blah.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: CXXMethod=comment_to_xml_conversion_02:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_02c:@S@comment_to_xml_conversion_01@F@comment_to_xml_conversion_02#I#int comment_to_xml_conversion_02(int aaa)aaa0in Blah blah.] /// \param aaa Blah blah. static int comment_to_xml_conversion_03(int aaa); -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:14: CXXMethod=comment_to_xml_conversion_03:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_03c:@C@comment_to_xml_conversion_01@F@comment_to_xml_conversion_03#I#Sstatic int comment_to_xml_conversion_03(int aaa)aaa0in Blah blah.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:14: CXXMethod=comment_to_xml_conversion_03:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_03c:@S@comment_to_xml_conversion_01@F@comment_to_xml_conversion_03#I#Sstatic int comment_to_xml_conversion_03(int aaa)aaa0in Blah blah.] /// Aaa. int comment_to_xml_conversion_04; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: FieldDecl=comment_to_xml_conversion_04:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_04c:@C@comment_to_xml_conversion_01@FI@comment_to_xml_conversion_04int comment_to_xml_conversion_04 Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: FieldDecl=comment_to_xml_conversion_04:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_04c:@S@comment_to_xml_conversion_01@FI@comment_to_xml_conversion_04int comment_to_xml_conversion_04 Aaa.] /// Aaa. static int comment_to_xml_conversion_05; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:14: VarDecl=comment_to_xml_conversion_05:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_05c:@C@comment_to_xml_conversion_01@comment_to_xml_conversion_05static int comment_to_xml_conversion_05 Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:14: VarDecl=comment_to_xml_conversion_05:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_05c:@S@comment_to_xml_conversion_01@comment_to_xml_conversion_05static int comment_to_xml_conversion_05 Aaa.] /// \param aaa Blah blah. void operator()(int aaa); -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:8: CXXMethod=operator():{{.*}} FullCommentAsXML=[operator()c:@C@comment_to_xml_conversion_01@F@operator()#I#void operator()(int aaa)aaa0in Blah blah.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:8: CXXMethod=operator():{{.*}} FullCommentAsXML=[operator()c:@S@comment_to_xml_conversion_01@F@operator()#I#void operator()(int aaa)aaa0in Blah blah.] /// Aaa. operator bool(); -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConversion=operator bool:{{.*}} FullCommentAsXML=[operator boolc:@C@comment_to_xml_conversion_01@F@operator bool#operator bool() Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConversion=operator bool:{{.*}} FullCommentAsXML=[operator boolc:@S@comment_to_xml_conversion_01@F@operator bool#operator bool() Aaa.] /// Aaa. typedef int comment_to_xml_conversion_06; @@ -787,19 +787,19 @@ class comment_to_xml_conversion_01 { /// Aaa. using comment_to_xml_conversion_07 = int; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:9: TypeAliasDecl=comment_to_xml_conversion_07:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_07c:@C@comment_to_xml_conversion_01@comment_to_xml_conversion_07using comment_to_xml_conversion_07 = int Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:9: TypeAliasDecl=comment_to_xml_conversion_07:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_07c:@S@comment_to_xml_conversion_01@comment_to_xml_conversion_07using comment_to_xml_conversion_07 = int Aaa.] /// Aaa. template class comment_to_xml_conversion_08 { }; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:9: ClassTemplate=comment_to_xml_conversion_08:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_08c:@C@comment_to_xml_conversion_01@CT>2#T#T@comment_to_xml_conversion_08template <typename T, typename U> class comment_to_xml_conversion_08 {} Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:9: ClassTemplate=comment_to_xml_conversion_08:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_08c:@S@comment_to_xml_conversion_01@ST>2#T#T@comment_to_xml_conversion_08template <typename T, typename U> class comment_to_xml_conversion_08 {} Aaa.] /// Aaa. template using comment_to_xml_conversion_09 = comment_to_xml_conversion_08; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: UnexposedDecl=comment_to_xml_conversion_09:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_09c:@C@comment_to_xml_conversion_01@comment_to_xml_conversion_09template <typename T>\nusing comment_to_xml_conversion_09 = comment_to_xml_conversion_08<T, int> Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: UnexposedDecl=comment_to_xml_conversion_09:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_09c:@S@comment_to_xml_conversion_01@comment_to_xml_conversion_09template <typename T>\nusing comment_to_xml_conversion_09 = comment_to_xml_conversion_08<T, int> Aaa.] }; /// Aaa. @@ -818,19 +818,19 @@ void comment_to_xml_conversion_10(int aaa, int bbb); template class comment_to_xml_conversion_11 { }; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplate=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_11c:@CT>2#T#T@comment_to_xml_conversion_11template <typename T, typename U> class comment_to_xml_conversion_11 {} Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplate=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_11c:@ST>2#T#T@comment_to_xml_conversion_11template <typename T, typename U> class comment_to_xml_conversion_11 {} Aaa.] /// Aaa. template class comment_to_xml_conversion_11 { }; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplatePartialSpecialization=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_11c:@CP>1#T@comment_to_xml_conversion_11>#t0.0#Iclass comment_to_xml_conversion_11 {} Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassTemplatePartialSpecialization=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_11c:@SP>1#T@comment_to_xml_conversion_11>#t0.0#Iclass comment_to_xml_conversion_11 {} Aaa.] /// Aaa. template<> class comment_to_xml_conversion_11 { }; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassDecl=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_11c:@C@comment_to_xml_conversion_11>#I#Iclass comment_to_xml_conversion_11 {} Aaa.] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:7: ClassDecl=comment_to_xml_conversion_11:{{.*}} FullCommentAsXML=[comment_to_xml_conversion_11c:@S@comment_to_xml_conversion_11>#I#Iclass comment_to_xml_conversion_11 {} Aaa.] /// Aaa. int comment_to_xml_conversion_12; @@ -902,7 +902,7 @@ void comment_to_xml_conversion_unsafe_html_07(); class BaseToSuper1_Base {}; class BaseToSuper1_Derived : public BaseToSuper1_Base {}; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper1_Derived:{{.*}} FullCommentAsXML=[BaseToSuper1_Basec:@C@BaseToSuper1_Baseclass BaseToSuper1_Derived : public BaseToSuper1_Base {} BaseToSuper1_Base] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper1_Derived:{{.*}} FullCommentAsXML=[BaseToSuper1_Basec:@S@BaseToSuper1_Baseclass BaseToSuper1_Derived : public BaseToSuper1_Base {} BaseToSuper1_Base] /// BaseToSuper2_Base @@ -910,10 +910,10 @@ class BaseToSuper2_Base {}; /// BaseToSuper2_Derived class BaseToSuper2_Derived : public BaseToSuper2_Base {}; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper2_Derived:{{.*}} FullCommentAsXML=[BaseToSuper2_Derivedc:@C@BaseToSuper2_Derivedclass BaseToSuper2_Derived : public BaseToSuper2_Base {} BaseToSuper2_Derived] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper2_Derived:{{.*}} FullCommentAsXML=[BaseToSuper2_Derivedc:@S@BaseToSuper2_Derivedclass BaseToSuper2_Derived : public BaseToSuper2_Base {} BaseToSuper2_Derived] class BaseToSuper2_MoreDerived : public BaseToSuper2_Derived {}; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper2_MoreDerived:{{.*}} FullCommentAsXML=[BaseToSuper2_Derivedc:@C@BaseToSuper2_Derivedclass BaseToSuper2_MoreDerived : public BaseToSuper2_Derived {} BaseToSuper2_Derived] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper2_MoreDerived:{{.*}} FullCommentAsXML=[BaseToSuper2_Derivedc:@S@BaseToSuper2_Derivedclass BaseToSuper2_MoreDerived : public BaseToSuper2_Derived {} BaseToSuper2_Derived] /// BaseToSuper3_Base @@ -924,7 +924,7 @@ class BaseToSuper3_DerivedA : public virtual BaseToSuper3_Base {}; class BaseToSuper3_DerivedB : public virtual BaseToSuper3_Base {}; class BaseToSuper3_MoreDerived : public BaseToSuper3_DerivedA, public BaseToSuper3_DerivedB {}; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper3_MoreDerived:{{.*}} FullCommentAsXML=[BaseToSuper3_Basec:@C@BaseToSuper3_Baseclass BaseToSuper3_MoreDerived : public BaseToSuper3_DerivedA,\n public BaseToSuper3_DerivedB {} BaseToSuper3_Base] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper3_MoreDerived:{{.*}} FullCommentAsXML=[BaseToSuper3_Basec:@S@BaseToSuper3_Baseclass BaseToSuper3_MoreDerived : public BaseToSuper3_DerivedA,\n public BaseToSuper3_DerivedB {} BaseToSuper3_Base] // Check that we propagate comments only through public inheritance. @@ -938,7 +938,7 @@ class BaseToSuper4_DerivedA : virtual BaseToSuper4_Base {}; class BaseToSuper4_DerivedB : public virtual BaseToSuper4_Base {}; class BaseToSuper4_MoreDerived : BaseToSuper4_DerivedA, public BaseToSuper4_DerivedB {}; -// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper4_MoreDerived:{{.*}} FullCommentAsXML=[BaseToSuper4_Basec:@C@BaseToSuper4_Baseclass BaseToSuper4_MoreDerived : BaseToSuper4_DerivedA,\n public BaseToSuper4_DerivedB {} BaseToSuper4_Base] +// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:7: ClassDecl=BaseToSuper4_MoreDerived:{{.*}} FullCommentAsXML=[BaseToSuper4_Basec:@S@BaseToSuper4_Baseclass BaseToSuper4_MoreDerived : BaseToSuper4_DerivedA,\n public BaseToSuper4_DerivedB {} BaseToSuper4_Base] //===--- // Check the representation of \todo in XML. diff --git a/test/Index/cxx11-lambdas.cpp b/test/Index/cxx11-lambdas.cpp index afb540a84d..d0ee908059 100644 --- a/test/Index/cxx11-lambdas.cpp +++ b/test/Index/cxx11-lambdas.cpp @@ -30,4 +30,4 @@ struct X { // CHECK-INDEX: [indexEntityReference]: kind: typedef | name: Integer | USR: c:cxx11-lambdas.cpp@T@Integer | lang: C | cursor: TypeRef=Integer:3:13 | loc: 7:38 // CHECK-INDEX: [indexEntityReference]: kind: variable | name: localA | USR: c:cxx11-lambdas.cpp@100@S@X@F@f#@localA | lang: C | cursor: DeclRefExpr=localA:6:9 | loc: 8:14 // CHECK-INDEX: [indexEntityReference]: kind: variable | name: localB | USR: c:cxx11-lambdas.cpp@100@S@X@F@f#@localB | lang: C | cursor: DeclRefExpr=localB:6:17 | loc: 8:23 -// CHECK-INDEX: [indexEntityReference]: kind: variable | name: x | USR: c:cxx11-lambdas.cpp@157@S@X@F@f#@Ca@F@operator()#I#1@x | lang: C | cursor: DeclRefExpr=x:7:46 | loc: 8:32 +// CHECK-INDEX: [indexEntityReference]: kind: variable | name: x | USR: c:cxx11-lambdas.cpp@157@S@X@F@f#@Sa@F@operator()#I#1@x | lang: C | cursor: DeclRefExpr=x:7:46 | loc: 8:32 diff --git a/test/Index/index-templates.cpp b/test/Index/index-templates.cpp index dc9036c3bb..570d7cf15d 100644 --- a/test/Index/index-templates.cpp +++ b/test/Index/index-templates.cpp @@ -196,22 +196,22 @@ void foo(float Value); // CHECK-USRS: index-templates.cpp c:index-templates.cpp@82 Extent=[3:22 - 3:29] // CHECK-USRS: index-templates.cpp c:index-templates.cpp@91 Extent=[3:31 - 3:67] // CHECK-USRS: index-templates.cpp c:index-templates.cpp@136@FT@>3#T#Nt0.0#t>2#T#Nt1.0f#>t0.22S0_#v#@x Extent=[4:8 - 4:21] -// CHECK-USRS: index-templates.cpp c:@CT>1#T@allocator Extent=[6:1 - 6:37] +// CHECK-USRS: index-templates.cpp c:@ST>1#T@allocator Extent=[6:1 - 6:37] // CHECK-USRS: index-templates.cpp c:index-templates.cpp@162 Extent=[6:10 - 6:20] -// CHECK-USRS: index-templates.cpp c:@CT>2#T#T@vector Extent=[8:1 - 11:2] +// CHECK-USRS: index-templates.cpp c:@ST>2#T#T@vector Extent=[8:1 - 11:2] // CHECK-USRS: index-templates.cpp c:index-templates.cpp@201 Extent=[8:10 - 8:20] // CHECK-USRS: index-templates.cpp c:index-templates.cpp@213 Extent=[8:22 - 8:51] -// CHECK-USRS: index-templates.cpp c:@CT>2#T#T@vector@F@clear# Extent=[10:3 - 10:15] -// CHECK-USRS: index-templates.cpp c:@CP>1#T@vector>#*t0.0#>@CT>1#T@allocator1S0_ Extent=[13:1 - 14:21] +// CHECK-USRS: index-templates.cpp c:@ST>2#T#T@vector@F@clear# Extent=[10:3 - 10:15] +// CHECK-USRS: index-templates.cpp c:@SP>1#T@vector>#*t0.0#>@ST>1#T@allocator1S0_ Extent=[13:1 - 14:21] // CHECK-USRS: index-templates.cpp c:index-templates.cpp@289 Extent=[13:10 - 13:20] // CHECK-USRS: index-templates.cpp c:@S@Z1 Extent=[16:1 - 16:14] -// CHECK-USRS: index-templates.cpp c:@C@vector>#$@S@Z1#$@C@allocator>#S0_ Extent=[18:1 - 18:26] +// CHECK-USRS: index-templates.cpp c:@S@vector>#$@S@Z1#$@S@allocator>#S0_ Extent=[18:1 - 18:26] // CHECK-USRS: index-templates.cpp c:@S@Z2 Extent=[20:1 - 20:14] -// CHECK-USRS: index-templates.cpp c:@C@vector>#$@S@Z2#$@C@allocator>#S0_ Extent=[22:1 - 25:2] -// CHECK-USRS: index-templates.cpp c:@C@vector>#$@S@Z2#$@C@allocator>#S0_@F@clear# Extent=[24:3 - 24:15] +// CHECK-USRS: index-templates.cpp c:@S@vector>#$@S@Z2#$@S@allocator>#S0_ Extent=[22:1 - 25:2] +// CHECK-USRS: index-templates.cpp c:@S@vector>#$@S@Z2#$@S@allocator>#S0_@F@clear# Extent=[24:3 - 24:15] // CHECK-USRS: index-templates.cpp c:@ST>2#T#T@Y Extent=[27:1 - 31:2] // CHECK-USRS: index-templates.cpp c:index-templates.cpp@443 Extent=[27:10 - 27:20] // CHECK-USRS: index-templates.cpp c:index-templates.cpp@455 Extent=[27:22 - 27:32] // CHECK-USRS-NOT: type // CHECK-USRS: index-templates.cpp c:@S@Z3 Extent=[33:1 - 33:14] -// CHECK-USRS: index-templates.cpp c:@F@f#$@S@map>#$@S@Z4#$@S@Pair>#I#S1_#$@S@compare>#$@S@Pair>#S1_#S2_#$@C@allocator>#S4_# +// CHECK-USRS: index-templates.cpp c:@F@f#$@S@map>#$@S@Z4#$@S@Pair>#I#S1_#$@S@compare>#$@S@Pair>#S1_#S2_#$@S@allocator>#S4_# diff --git a/test/Index/usrs-cxx0x.cpp b/test/Index/usrs-cxx0x.cpp index 6f28ebc562..b40bc4c12c 100644 --- a/test/Index/usrs-cxx0x.cpp +++ b/test/Index/usrs-cxx0x.cpp @@ -13,6 +13,6 @@ class TestCls { // CHECK: usrs-cxx0x.cpp c:@ST>1#pT@tuple Extent=[1:1 - 2:17] // CHECK: usrs-cxx0x.cpp c:@F@f#$@S@tuple>#p3Ifd# Extent=[4:1 - 4:34] -// CHECK: usrs-cxx0x.cpp c:@C@TestCls@F@meth#& Extent=[7:3 - 7:16] -// CHECK: usrs-cxx0x.cpp c:@C@TestCls@F@meth#&& Extent=[8:3 - 8:17] -// CHECK: usrs-cxx0x.cpp c:@C@TestCls@F@meth#&&I# Extent=[9:3 - 9:19] +// CHECK: usrs-cxx0x.cpp c:@S@TestCls@F@meth#& Extent=[7:3 - 7:16] +// CHECK: usrs-cxx0x.cpp c:@S@TestCls@F@meth#&& Extent=[8:3 - 8:17] +// CHECK: usrs-cxx0x.cpp c:@S@TestCls@F@meth#&&I# Extent=[9:3 - 9:19] diff --git a/test/Index/usrs.cpp b/test/Index/usrs.cpp index f277740393..0b66a2211c 100644 --- a/test/Index/usrs.cpp +++ b/test/Index/usrs.cpp @@ -96,20 +96,20 @@ void funWithChar(signed char c) {} // CHECK: usrs.cpp c:usrs.cpp@N@bar@T@QType Extent=[6:3 - 6:20] // CHECK: usrs.cpp c:@N@bar@F@bar#I# Extent=[7:3 - 7:20] // CHECK: usrs.cpp c:usrs.cpp@94@N@bar@F@bar#I#@z Extent=[7:12 - 7:19] -// CHECK: usrs.cpp c:@C@ClsA Extent=[10:1 - 14:2] +// CHECK: usrs.cpp c:@S@ClsA Extent=[10:1 - 14:2] // CHECK: usrs.cpp c: Extent=[11:1 - 11:8] -// CHECK: usrs.cpp c:@C@ClsA@FI@a Extent=[12:3 - 12:8] -// CHECK: usrs.cpp c:@C@ClsA@FI@b Extent=[12:3 - 12:11] -// CHECK: usrs.cpp c:@C@ClsA@F@ClsA#I#I# Extent=[13:3 - 13:37] -// CHECK: usrs.cpp c:usrs.cpp@147@C@ClsA@F@ClsA#I#I#@A Extent=[13:8 - 13:13] -// CHECK: usrs.cpp c:usrs.cpp@154@C@ClsA@F@ClsA#I#I#@B Extent=[13:15 - 13:20] +// CHECK: usrs.cpp c:@S@ClsA@FI@a Extent=[12:3 - 12:8] +// CHECK: usrs.cpp c:@S@ClsA@FI@b Extent=[12:3 - 12:11] +// CHECK: usrs.cpp c:@S@ClsA@F@ClsA#I#I# Extent=[13:3 - 13:37] +// CHECK: usrs.cpp c:usrs.cpp@147@S@ClsA@F@ClsA#I#I#@A Extent=[13:8 - 13:13] +// CHECK: usrs.cpp c:usrs.cpp@154@S@ClsA@F@ClsA#I#I#@B Extent=[13:15 - 13:20] // CHECK: usrs.cpp c:@N@foo Extent=[16:1 - 22:2] -// CHECK: usrs.cpp c:@N@foo@C@ClsB Extent=[17:3 - 21:4] +// CHECK: usrs.cpp c:@N@foo@S@ClsB Extent=[17:3 - 21:4] // CHECK: usrs.cpp c: Extent=[18:3 - 18:10] -// CHECK: usrs.cpp c:@N@foo@C@ClsB@F@ClsB# Extent=[19:5 - 19:27] -// CHECK: usrs.cpp c:@N@foo@C@ClsB@F@result#1 Extent=[20:5 - 20:23] -// CHECK: usrs.cpp c:@N@foo@C@ClsB@F@result#1 Extent=[24:1 - 26:2] -// CHECK: usrs.cpp c:usrs.cpp@aN@C@ClsC Extent=[29:3 - 29:35] +// CHECK: usrs.cpp c:@N@foo@S@ClsB@F@ClsB# Extent=[19:5 - 19:27] +// CHECK: usrs.cpp c:@N@foo@S@ClsB@F@result#1 Extent=[20:5 - 20:23] +// CHECK: usrs.cpp c:@N@foo@S@ClsB@F@result#1 Extent=[24:1 - 26:2] +// CHECK: usrs.cpp c:usrs.cpp@aN@S@ClsC Extent=[29:3 - 29:35] // CHECK: usrs.cpp c:usrs.cpp@aN@w Extent=[30:3 - 30:8] // CHECK: usrs.cpp c:@z Extent=[33:1 - 33:6] // CHECK: usrs.cpp c:@N@foo Extent=[35:1 - 40:2] @@ -123,19 +123,19 @@ void funWithChar(signed char c) {} // CHECK: usrs.cpp c:usrs.cpp@529@N@foo@N@taz@F@sub#I#I#@b Extent=[38:19 - 38:24] // CHECK: usrs.cpp c:@N@foo Extent=[42:1 - 52:3] // CHECK: usrs.cpp c:@N@foo@N@taz Extent=[42:17 - 52:2] -// CHECK: usrs.cpp c:@N@foo@N@taz@C@ClsD Extent=[43:3 - 51:4] +// CHECK: usrs.cpp c:@N@foo@N@taz@S@ClsD Extent=[43:3 - 51:4] // CHECK: usrs.cpp c: Extent=[44:3 - 44:10] -// CHECK: usrs.cpp c:@N@foo@N@taz@C@ClsD@F@operator=#I# Extent=[45:5 - 45:52] -// CHECK: usrs.cpp c:usrs.cpp@638@N@foo@N@taz@C@ClsD@F@operator=#I#@x Extent=[45:21 - 45:26] -// CHECK: usrs.cpp c:@N@foo@N@taz@C@ClsD@F@operator=#d# Extent=[46:5 - 46:61] -// CHECK: usrs.cpp c:usrs.cpp@690@N@foo@N@taz@C@ClsD@F@operator=#d#@x Extent=[46:21 - 46:29] -// CHECK: usrs.cpp c:@N@foo@N@taz@C@ClsD@F@operator=#&1$@N@foo@N@taz@C@ClsD# Extent=[47:5 - 47:62] -// CHECK: usrs.cpp c:usrs.cpp@751@N@foo@N@taz@C@ClsD@F@operator=#&1$@N@foo@N@taz@C@ClsD#@x Extent=[47:21 - 47:34] -// CHECK: usrs.cpp c:@N@foo@N@taz@C@ClsD@F@qux#S Extent=[48:5 - 48:21] -// CHECK: usrs.cpp c:@N@foo@N@taz@C@ClsD@F@uz#I.#S Extent=[49:5 - 49:30] -// CHECK: usrs.cpp c:usrs.cpp@833@N@foo@N@taz@C@ClsD@F@uz#I.#S@z Extent=[49:19 - 49:24] -// CHECK: usrs.cpp c:@N@foo@N@taz@C@ClsD@F@operator==#&1$@N@foo@N@taz@C@ClsD#1 Extent=[50:5 - 50:62] -// CHECK: usrs.cpp c:usrs.cpp@866@N@foo@N@taz@C@ClsD@F@operator==#&1$@N@foo@N@taz@C@ClsD#1@x Extent=[50:21 - 50:34] +// CHECK: usrs.cpp c:@N@foo@N@taz@S@ClsD@F@operator=#I# Extent=[45:5 - 45:52] +// CHECK: usrs.cpp c:usrs.cpp@638@N@foo@N@taz@S@ClsD@F@operator=#I#@x Extent=[45:21 - 45:26] +// CHECK: usrs.cpp c:@N@foo@N@taz@S@ClsD@F@operator=#d# Extent=[46:5 - 46:61] +// CHECK: usrs.cpp c:usrs.cpp@690@N@foo@N@taz@S@ClsD@F@operator=#d#@x Extent=[46:21 - 46:29] +// CHECK: usrs.cpp c:@N@foo@N@taz@S@ClsD@F@operator=#&1$@N@foo@N@taz@S@ClsD# Extent=[47:5 - 47:62] +// CHECK: usrs.cpp c:usrs.cpp@751@N@foo@N@taz@S@ClsD@F@operator=#&1$@N@foo@N@taz@S@ClsD#@x Extent=[47:21 - 47:34] +// CHECK: usrs.cpp c:@N@foo@N@taz@S@ClsD@F@qux#S Extent=[48:5 - 48:21] +// CHECK: usrs.cpp c:@N@foo@N@taz@S@ClsD@F@uz#I.#S Extent=[49:5 - 49:30] +// CHECK: usrs.cpp c:usrs.cpp@833@N@foo@N@taz@S@ClsD@F@uz#I.#S@z Extent=[49:19 - 49:24] +// CHECK: usrs.cpp c:@N@foo@N@taz@S@ClsD@F@operator==#&1$@N@foo@N@taz@S@ClsD#1 Extent=[50:5 - 50:62] +// CHECK: usrs.cpp c:usrs.cpp@866@N@foo@N@taz@S@ClsD@F@operator==#&1$@N@foo@N@taz@S@ClsD#1@x Extent=[50:21 - 50:34] // CHECK: usrs.cpp c:@F@rez Extent=[55:3 - 55:25] // CHECK: usrs.cpp c:usrs.cpp@941@F@rez@a Extent=[55:12 - 55:17] // CHECK: usrs.cpp c:usrs.cpp@948@F@rez@b Extent=[55:19 - 55:24] @@ -145,10 +145,10 @@ void funWithChar(signed char c) {} // CHECK-NOT: ClsB // CHECK: usrs.cpp c:@NA@foo_alias3 // CHECK: usrs.cpp c:@aN Extent=[68:1 - 73:2] -// CHECK: usrs.cpp c:usrs.cpp@aN@C@RDar9371763_Foo Extent=[69:1 - 72:2] +// CHECK: usrs.cpp c:usrs.cpp@aN@S@RDar9371763_Foo Extent=[69:1 - 72:2] // CHECK: usrs.cpp c: Extent=[70:1 - 70:8] -// CHECK: usrs.cpp c:usrs.cpp@aN@C@RDar9371763_Foo@F@bar# Extent=[71:3 - 71:13] -// CHECK: usrs.cpp c:usrs.cpp@aN@C@RDar9371763_Foo@F@bar# Extent=[75:1 - 75:31] +// CHECK: usrs.cpp c:usrs.cpp@aN@S@RDar9371763_Foo@F@bar# Extent=[71:3 - 71:13] +// CHECK: usrs.cpp c:usrs.cpp@aN@S@RDar9371763_Foo@F@bar# Extent=[75:1 - 75:31] // CHECK: usrs.cpp c:@F@rdar9371763# Extent=[77:1 - 80:2] // CHECK: usrs.cpp c:usrs.cpp@1204@F@rdar9371763#@foo Extent=[78:3 - 78:22] -- 2.40.0