From 21e703a0b0c4598179273fc3e731248a71e9cf3e Mon Sep 17 00:00:00 2001 From: sys_ce_bb Date: Thu, 1 Feb 2024 08:09:09 -0800 Subject: [PATCH] Revert "Update add-ir-annotations tests after 5518a9d7673b" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3d4c6c7631ed91039ffae824182ba5aeb5bcb657. Due to | * 6e6aa44c7d14b37a12e40c6b36478045d6004a0a 2024-01-31 Revert "[Clang][Sema] fix outline member function template with defau… (#80144) ekeane@nvidia.com --- .../AST/ast-attr-add-ir-annotations-pack.cpp | 378 +++++++++--------- .../attr-add-ir-annotations-packs.cpp | 8 +- 2 files changed, 200 insertions(+), 186 deletions(-) diff --git a/clang/test/AST/ast-attr-add-ir-annotations-pack.cpp b/clang/test/AST/ast-attr-add-ir-annotations-pack.cpp index 10798849357fb..05ba9fc34bb14 100644 --- a/clang/test/AST/ast-attr-add-ir-annotations-pack.cpp +++ b/clang/test/AST/ast-attr-add-ir-annotations-pack.cpp @@ -252,9 +252,12 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName3' 'const char[6]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate3 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr @@ -262,23 +265,20 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Names - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName1' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Names - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName2' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Names - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName3' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'int' // CHECK-NEXT: value: Int 1 // CHECK-NEXT: IntegerLiteral {{.*}} 'int' 1 @@ -290,10 +290,10 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: IntegerLiteral {{.*}} 'int' 3 // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate3 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate3 'void (const ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0], &AttrName3[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0], &AttrName3[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate3 'void (ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0], &AttrName3[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0], &AttrName3[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate3 'void (const ClassWithAnnotFieldTemplate3 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate3 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate3 'void (ClassWithAnnotFieldTemplate3 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate3 &&' // CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate3 definition // CHECK-NEXT: DefinitionData // CHECK-NEXT: DefaultConstructor @@ -303,16 +303,18 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate3 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate3 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate3 'void (const ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate3 'void (ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate3 'void (const ClassWithAnnotFieldTemplate3 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate3 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate3 'void (ClassWithAnnotFieldTemplate3 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate3 &&' ClassWithAnnotFieldTemplate3 InstantiatedCWAFS5; ClassWithAnnotFieldTemplate3 InstantiatedCWAFS6; @@ -352,9 +354,12 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName3' 'const char[6]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate4 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr @@ -365,23 +370,20 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Names - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName1' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Names - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName2' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Names - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName3' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'int' // CHECK-NEXT: value: Int 1 // CHECK-NEXT: IntegerLiteral {{.*}} 'int' 1 @@ -393,10 +395,10 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: IntegerLiteral {{.*}} 'int' 3 // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate4 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate4 'void (const ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0], &AttrName3[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0], &AttrName3[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate4 'void (ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0], &AttrName3[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0], &AttrName3[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate4 'void (const ClassWithAnnotFieldTemplate4 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate4 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate4 'void (ClassWithAnnotFieldTemplate4 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate4 &&' // CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate4 definition // CHECK-NEXT: DefinitionData // CHECK-NEXT: DefaultConstructor @@ -406,16 +408,18 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate4 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate4 'void () noexcept' inline default trivial // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate4 'void (const ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate4 'void (ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate4 'void (const ClassWithAnnotFieldTemplate4 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate4 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate4 'void (ClassWithAnnotFieldTemplate4 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate4 &&' ClassWithAnnotFieldTemplate4 InstantiatedCWAFS7; ClassWithAnnotFieldTemplate4 InstantiatedCWAFS8; @@ -443,8 +447,10 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal1' 'const char[5]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate5 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr @@ -452,22 +458,20 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName1' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal1' 'const char[5]' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate5 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (const ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrVal1[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrVal1[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrVal1[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrVal1[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (const ClassWithAnnotFieldTemplate5 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate5 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (ClassWithAnnotFieldTemplate5 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate5 &&' // CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate5 definition // CHECK-NEXT: DefinitionData // CHECK-NEXT: DefaultConstructor @@ -477,10 +481,14 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal1' 'const char[5]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal2' 'const char[5]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate5 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr @@ -488,36 +496,32 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName1' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName2' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal1' 'const char[5]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal2' 'const char[5]' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate5 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (const ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrVal1[0], &AttrVal2[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrVal1[0], &AttrVal2[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrVal1[0], &AttrVal2[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrVal1[0], &AttrVal2[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (const ClassWithAnnotFieldTemplate5 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate5 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (ClassWithAnnotFieldTemplate5 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate5 &&' // CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate5 definition // CHECK-NEXT: DefinitionData // CHECK-NEXT: DefaultConstructor @@ -527,12 +531,18 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName3' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal1' 'const char[5]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal2' 'const char[5]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal3' 'const char[5]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate5 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr @@ -540,50 +550,44 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName1' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName2' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName3' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal1' 'const char[5]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal2' 'const char[5]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal3' 'const char[5]' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate5 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (const ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0], &AttrVal3[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0], &AttrVal3[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0], &AttrVal3[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0], &AttrVal3[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (const ClassWithAnnotFieldTemplate5 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate5 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (ClassWithAnnotFieldTemplate5 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate5 &&' // CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate5 definition // CHECK-NEXT: DefinitionData // CHECK-NEXT: DefaultConstructor @@ -593,19 +597,24 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName3' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal1' 'const char[5]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal2' 'const char[5]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate5 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate5 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (const ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (const ClassWithAnnotFieldTemplate5 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate5 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate5 'void (ClassWithAnnotFieldTemplate5 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate5 &&' ClassWithAnnotFieldTemplate5 InstantiatedCWAFS9; ClassWithAnnotFieldTemplate5 InstantiatedCWAFS10; ClassWithAnnotFieldTemplate5 InstantiatedCWAFS11; @@ -638,8 +647,10 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal1' 'const char[5]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate6 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr @@ -650,22 +661,20 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName1' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal1' 'const char[5]' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate6 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (const ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrVal1[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrVal1[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrVal1[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrVal1[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (const ClassWithAnnotFieldTemplate6 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate6 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (ClassWithAnnotFieldTemplate6 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate6 &&' // CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate6 definition // CHECK-NEXT: DefinitionData // CHECK-NEXT: DefaultConstructor @@ -675,10 +684,14 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal1' 'const char[5]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal2' 'const char[5]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate6 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr @@ -689,36 +702,32 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName1' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName2' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal1' 'const char[5]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} col:26 referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal2' 'const char[5]' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate6 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (const ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrVal1[0], &AttrVal2[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrVal1[0], &AttrVal2[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrVal1[0], &AttrVal2[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrVal1[0], &AttrVal2[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (const ClassWithAnnotFieldTemplate6 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate6 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (ClassWithAnnotFieldTemplate6 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate6 &&' // CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate6 definition // CHECK-NEXT: DefinitionData // CHECK-NEXT: DefaultConstructor @@ -728,12 +737,18 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName3' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal1' 'const char[5]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal2' 'const char[5]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal3' 'const char[5]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate6 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: SYCLAddIRAnnotationsMemberAttr @@ -744,50 +759,44 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName1' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName2' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[6]' lvalue Var {{.*}} 'AttrName3' 'const char[6]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal1' 'const char[5]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal2' 'const char[5]' // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' // CHECK-NEXT: value: LValue // CHECK-NEXT: SubstNonTypeTemplateParmExpr {{.*}} 'const char *' // CHECK-NEXT: NonTypeTemplateParmDecl {{.*}} referenced 'const char *' depth 0 index 0 ... Strs - // CHECK-NEXT: ConstantExpr {{.*}} 'const char *' - // CHECK-NEXT: value: LValue - // CHECK-NEXT: OpaqueValueExpr {{.*}} 'const char *' + // CHECK-NEXT: ImplicitCastExpr {{.*}} 'const char *' + // CHECK-NEXT: DeclRefExpr {{.*}} 'const char[5]' lvalue Var {{.*}} 'AttrVal3' 'const char[5]' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate6 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (const ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0], &AttrVal3[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0], &AttrVal3[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0], &AttrVal3[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0], &AttrVal3[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (const ClassWithAnnotFieldTemplate6 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate6 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (ClassWithAnnotFieldTemplate6 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate6 &&' // CHECK-NEXT: ClassTemplateSpecializationDecl {{.*}} struct ClassWithAnnotFieldTemplate6 definition // CHECK-NEXT: DefinitionData // CHECK-NEXT: DefaultConstructor @@ -797,19 +806,24 @@ void InstantiateClassWithAnnotFieldTemplates() { // CHECK-NEXT: MoveAssignment // CHECK-NEXT: Destructor // CHECK-NEXT: TemplateArgument pack - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument - // CHECK-NEXT: TemplateArgument + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName1' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName2' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrName3' 'const char[6]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal1' 'const char[5]' + // CHECK-NEXT: TemplateArgument decl + // CHECK-NEXT: Var {{.*}} 'AttrVal2' 'const char[5]' // CHECK-NEXT: CXXRecordDecl {{.*}} implicit struct ClassWithAnnotFieldTemplate6 // CHECK-NEXT: FieldDecl {{.*}} referenced ptr 'int *' // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit used ClassWithAnnotFieldTemplate6 'void () noexcept' // CHECK-NEXT: CompoundStmt - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (const ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]> &)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]> &' - // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]> &&)' - // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]> &&' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (const ClassWithAnnotFieldTemplate6 &)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'const ClassWithAnnotFieldTemplate6 &' + // CHECK-NEXT: CXXConstructorDecl {{.*}} implicit constexpr ClassWithAnnotFieldTemplate6 'void (ClassWithAnnotFieldTemplate6 &&)' + // CHECK-NEXT: ParmVarDecl {{.*}} 'ClassWithAnnotFieldTemplate6 &&' ClassWithAnnotFieldTemplate6 InstantiatedCWAFS13; ClassWithAnnotFieldTemplate6 InstantiatedCWAFS14; ClassWithAnnotFieldTemplate6 InstantiatedCWAFS15; diff --git a/clang/test/SemaSYCL/attr-add-ir-annotations-packs.cpp b/clang/test/SemaSYCL/attr-add-ir-annotations-packs.cpp index b2681774cce41..33e80417bb390 100644 --- a/clang/test/SemaSYCL/attr-add-ir-annotations-packs.cpp +++ b/clang/test/SemaSYCL/attr-add-ir-annotations-packs.cpp @@ -37,20 +37,20 @@ void InstantiateClassWithAnnotFieldTemplates() { ClassWithAnnotFieldTemplate2<1, 2> InstantiatedCWAFS4; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate2<1, 2>' requested here}} ClassWithAnnotFieldTemplate3 InstantiatedCWAFS5; - ClassWithAnnotFieldTemplate3 InstantiatedCWAFS6; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate3<&AttrName1[0], &AttrName2[0]>' requested here}} + ClassWithAnnotFieldTemplate3 InstantiatedCWAFS6; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate3' requested here}} ClassWithAnnotFieldTemplate4 InstantiatedCWAFS7; - ClassWithAnnotFieldTemplate4 InstantiatedCWAFS8; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate4<&AttrName1[0], &AttrName2[0]>' requested here}} + ClassWithAnnotFieldTemplate4 InstantiatedCWAFS8; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate4' requested here}} ClassWithAnnotFieldTemplate5 InstantiatedCWAFS9; ClassWithAnnotFieldTemplate5 InstantiatedCWAFS10; ClassWithAnnotFieldTemplate5 InstantiatedCWAFS11; - ClassWithAnnotFieldTemplate5 InstantiatedCWAFS12; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate5<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]>' requested here}} + ClassWithAnnotFieldTemplate5 InstantiatedCWAFS12; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate5' requested here}} ClassWithAnnotFieldTemplate6 InstantiatedCWAFS13; ClassWithAnnotFieldTemplate6 InstantiatedCWAFS14; ClassWithAnnotFieldTemplate6 InstantiatedCWAFS15; - ClassWithAnnotFieldTemplate6 InstantiatedCWAFS16; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate6<&AttrName1[0], &AttrName2[0], &AttrName3[0], &AttrVal1[0], &AttrVal2[0]>' requested here}} + ClassWithAnnotFieldTemplate6 InstantiatedCWAFS16; // expected-note {{in instantiation of template class 'ClassWithAnnotFieldTemplate6' requested here}} (void)*InstantiatedCWAFS1.ptr; (void)*InstantiatedCWAFS2.ptr;