diff --git a/clang-tools-extra/clangd/test/ast-no-range.test b/clang-tools-extra/clangd/test/ast-no-range.test index 34adffefc91f7..2375ca243fbad 100644 --- a/clang-tools-extra/clangd/test/ast-no-range.test +++ b/clang-tools-extra/clangd/test/ast-no-range.test @@ -10,7 +10,7 @@ # CHECK-NEXT: "arcana": "{{TranslationUnitDecl.*}}" # CHECK-NEXT: "children": [ # CHECK-NEXT: { -# CHECK: "arcana": "VarDecl {{.*}} x 'int'", +# CHECK: "arcana": "VarDecl {{.*}} x 'int' external-linkage", # CHECK-NEXT: "children": [ # CHECK-NEXT: { # CHECK-NEXT: "arcana": "QualType {{.*}} 'int' ", diff --git a/clang-tools-extra/clangd/test/ast.test b/clang-tools-extra/clangd/test/ast.test index 2185f14eefb8b..772faaceb41f1 100644 --- a/clang-tools-extra/clangd/test/ast.test +++ b/clang-tools-extra/clangd/test/ast.test @@ -10,7 +10,7 @@ # CHECK: "id": 1, # CHECK-NEXT: "jsonrpc": "2.0", # CHECK-NEXT: "result": { -# CHECK-NEXT: "arcana": "VarDecl {{.*}} x 'int'", +# CHECK-NEXT: "arcana": "VarDecl {{.*}} x 'int' external-linkage", # CHECK-NEXT: "children": [ # CHECK-NEXT: { # CHECK-NEXT: "arcana": "QualType {{.*}} 'int' ", diff --git a/clang-tools-extra/clangd/unittests/DumpASTTests.cpp b/clang-tools-extra/clangd/unittests/DumpASTTests.cpp index 7b7e8ae000bf0..1ea25d918dad6 100644 --- a/clang-tools-extra/clangd/unittests/DumpASTTests.cpp +++ b/clang-tools-extra/clangd/unittests/DumpASTTests.cpp @@ -211,7 +211,7 @@ TEST(DumpASTTests, Arcana) { auto Node = dumpAST(DynTypedNode::create(findDecl(AST, "x")), AST.getTokens(), AST.getASTContext()); EXPECT_THAT(Node.arcana, testing::StartsWith("VarDecl ")); - EXPECT_THAT(Node.arcana, testing::EndsWith(" 'int'")); + EXPECT_THAT(Node.arcana, testing::EndsWith(" 'int' external-linkage")); ASSERT_THAT(Node.children, SizeIs(1)) << "Expected one child typeloc"; EXPECT_THAT(Node.children.front().arcana, testing::StartsWith("QualType ")); } diff --git a/clang/include/clang/AST/TextNodeDumper.h b/clang/include/clang/AST/TextNodeDumper.h index 6b7ac6fac8111..0c515556a8b84 100644 --- a/clang/include/clang/AST/TextNodeDumper.h +++ b/clang/include/clang/AST/TextNodeDumper.h @@ -208,6 +208,7 @@ class TextNodeDumper void dumpType(QualType T); void dumpBareDeclRef(const Decl *D); void dumpName(const NamedDecl *ND); + void dumpFormalLinkage(const NamedDecl *ND); void dumpAccessSpecifier(AccessSpecifier AS); void dumpCleanupObject(const ExprWithCleanups::CleanupObject &C); void dumpTemplateSpecializationKind(TemplateSpecializationKind TSK); diff --git a/clang/lib/AST/TextNodeDumper.cpp b/clang/lib/AST/TextNodeDumper.cpp index 53982025dfd4d..a747c789956d4 100644 --- a/clang/lib/AST/TextNodeDumper.cpp +++ b/clang/lib/AST/TextNodeDumper.cpp @@ -1429,6 +1429,29 @@ static void dumpBasePath(raw_ostream &OS, const CastExpr *Node) { OS << ')'; } +void TextNodeDumper::dumpFormalLinkage(const NamedDecl *ND) { + switch (ND->getFormalLinkage()) { + case Linkage::None: + // A lot of declarations have no linkage, so we only dump linkage if there + // is one. + break; + case Linkage::Internal: + OS << " internal-linkage"; + break; + case Linkage::External: + OS << " external-linkage"; + break; + case Linkage::Module: + OS << " module-linkage"; + break; + case Linkage::Invalid: + llvm_unreachable("Linkage hasn't been computed!"); + case Linkage::UniqueExternal: + case Linkage::VisibleNone: + llvm_unreachable("Not a formal linkage!"); + } +} + void TextNodeDumper::VisitLoopControlStmt(const LoopControlStmt *Node) { if (!Node->hasLabelTarget()) return; @@ -2295,6 +2318,11 @@ void TextNodeDumper::VisitTypedefDecl(const TypedefDecl *D) { dumpType(D->getUnderlyingType()); if (D->isModulePrivate()) OS << " __module_private__"; + + const TagDecl *TD = D->getUnderlyingType()->getAsTagDecl(); + if (TD && TD->getTypedefNameForAnonDecl()) { + dumpFormalLinkage(D); + } } void TextNodeDumper::VisitEnumDecl(const EnumDecl *D) { @@ -2314,6 +2342,8 @@ void TextNodeDumper::VisitEnumDecl(const EnumDecl *D) { OS << " instantiated_from"; dumpPointer(Instance); } + + dumpFormalLinkage(D); } void TextNodeDumper::VisitRecordDecl(const RecordDecl *D) { @@ -2323,6 +2353,10 @@ void TextNodeDumper::VisitRecordDecl(const RecordDecl *D) { OS << " __module_private__"; if (D->isCompleteDefinition()) OS << " definition"; + + if (!D->isImplicit() && !D->getDescribedTemplate()) { + dumpFormalLinkage(D); + } } void TextNodeDumper::VisitEnumConstantDecl(const EnumConstantDecl *D) { @@ -2420,6 +2454,10 @@ void TextNodeDumper::VisitFunctionDecl(const FunctionDecl *D) { OS << " instantiated_from"; dumpPointer(Instance); } + + if (!isa(D) && !D->getDescribedTemplate()) { + dumpFormalLinkage(D); + } } void TextNodeDumper::VisitCXXDeductionGuideDecl( @@ -2520,6 +2558,10 @@ void TextNodeDumper::VisitVarDecl(const VarDecl *D) { AddChild("value", [=] { Visit(*Value, E->getType()); }); } } + + if (!D->getDescribedVarTemplate()) { + dumpFormalLinkage(D); + } } void TextNodeDumper::VisitBindingDecl(const BindingDecl *D) { @@ -2633,6 +2675,8 @@ void TextNodeDumper::VisitNamespaceDecl(const NamespaceDecl *D) { OS << " nested"; if (!D->isFirstDecl()) dumpDeclRef(D->getFirstDecl(), "original"); + + dumpFormalLinkage(D); } void TextNodeDumper::VisitUsingDirectiveDecl(const UsingDirectiveDecl *D) { @@ -2648,11 +2692,17 @@ void TextNodeDumper::VisitNamespaceAliasDecl(const NamespaceAliasDecl *D) { void TextNodeDumper::VisitTypeAliasDecl(const TypeAliasDecl *D) { dumpName(D); dumpType(D->getUnderlyingType()); + + const TagDecl *TD = D->getUnderlyingType()->getAsTagDecl(); + if (TD && TD->getTypedefNameForAnonDecl()) { + dumpFormalLinkage(D); + } } void TextNodeDumper::VisitTypeAliasTemplateDecl( const TypeAliasTemplateDecl *D) { dumpName(D); + dumpFormalLinkage(D); } void TextNodeDumper::VisitCXXRecordDecl(const CXXRecordDecl *D) { @@ -2813,14 +2863,17 @@ void TextNodeDumper::VisitCXXRecordDecl(const CXXRecordDecl *D) { void TextNodeDumper::VisitFunctionTemplateDecl(const FunctionTemplateDecl *D) { dumpName(D); + dumpFormalLinkage(D); } void TextNodeDumper::VisitClassTemplateDecl(const ClassTemplateDecl *D) { dumpName(D); + dumpFormalLinkage(D); } void TextNodeDumper::VisitVarTemplateDecl(const VarTemplateDecl *D) { dumpName(D); + dumpFormalLinkage(D); } void TextNodeDumper::VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D) { @@ -3118,6 +3171,7 @@ void TextNodeDumper::VisitBlockDecl(const BlockDecl *D) { void TextNodeDumper::VisitConceptDecl(const ConceptDecl *D) { dumpName(D); + dumpFormalLinkage(D); } void TextNodeDumper::VisitCompoundStmt(const CompoundStmt *S) { diff --git a/clang/test/AST/ast-dump-color.cpp b/clang/test/AST/ast-dump-color.cpp index 2e60e760283de..44e79c33ee649 100644 --- a/clang/test/AST/ast-dump-color.cpp +++ b/clang/test/AST/ast-dump-color.cpp @@ -43,7 +43,7 @@ struct Invalid { //CHECK: {{^}}[[Blue]]| |-[[RESET]][[Blue]]HTMLEndTagComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:13[[RESET]], [[Yellow]]col:16[[RESET]]> Name="a"{{$}} //CHECK: {{^}}[[Blue]]| |-[[RESET]][[Blue]]TextComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:5:4[[RESET]]> Text=" "{{$}} //CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]HTMLStartTagComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:5[[RESET]], [[Yellow]]col:8[[RESET]]> Name="br" SelfClosing{{$}} -//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]FunctionDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:9:1[[RESET]], [[Yellow]]line:16:1[[RESET]]> [[Yellow]]line:9:6[[RESET]][[CYAN]] TestAttributedStmt[[RESET]] [[Green]]'void ()'[[RESET]]{{$}} +//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]FunctionDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:9:1[[RESET]], [[Yellow]]line:16:1[[RESET]]> [[Yellow]]line:9:6[[RESET]][[CYAN]] TestAttributedStmt[[RESET]] [[Green]]'void ()'[[RESET]] external-linkage{{$}} //CHECK: {{^}}[[Blue]]| |-[[RESET]][[MAGENTA:.\[0;1;35m]]CompoundStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:27[[RESET]], [[Yellow]]line:16:1[[RESET]]>{{$}} //CHECK: {{^}}[[Blue]]| | `-[[RESET]][[MAGENTA]]SwitchStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:10:3[[RESET]], [[Yellow]]line:15:3[[RESET]]>{{$}} //CHECK: {{^}}[[Blue]]| | |-[[RESET]][[MAGENTA]]IntegerLiteral[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:10:11[[RESET]]> [[Green]]'int'[[RESET]][[Cyan:.\[0;36m]][[RESET]][[Cyan]][[RESET]][[CYAN]] 1[[RESET]]{{$}} @@ -63,7 +63,7 @@ struct Invalid { //CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]FullComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:8:4[[RESET]], [[Yellow]]col:11[[RESET]]>{{$}} //CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]ParagraphComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:4[[RESET]], [[Yellow]]col:11[[RESET]]>{{$}} //CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]TextComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:4[[RESET]], [[Yellow]]col:11[[RESET]]> Text=" Comment"{{$}} -//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:1[[RESET]], [[Yellow]]line:25:1[[RESET]]> [[Yellow]]line:18:33[[RESET]] class[[CYAN]] Mutex[[RESET]] definition{{$}} +//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:1[[RESET]], [[Yellow]]line:25:1[[RESET]]> [[Yellow]]line:18:33[[RESET]] class[[CYAN]] Mutex[[RESET]] definition external-linkage{{$}} //CHECK: {{^}}[[Blue]]| |-[[RESET]][[BLUE]]CapabilityAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:22[[RESET]]> capability "mutex"{{$}} //CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:1[[RESET]], [[Yellow]]col:33[[RESET]]> [[Yellow]]col:33[[RESET]] implicit class[[CYAN]] Mutex[[RESET]]{{$}} //CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]FieldDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:20:3[[RESET]], [[Yellow]]col:7[[RESET]]> [[Yellow]]col:7[[RESET]][[CYAN]] var1[[RESET]] [[Green]]'int'[[RESET]]{{$}} diff --git a/clang/test/AST/ast-dump-constant-expr.cpp b/clang/test/AST/ast-dump-constant-expr.cpp index 302f562eadd96..8edf19431d4d1 100644 --- a/clang/test/AST/ast-dump-constant-expr.cpp +++ b/clang/test/AST/ast-dump-constant-expr.cpp @@ -57,8 +57,8 @@ struct Test { }; // CHECK:Dumping Test: -// CHECK-NEXT:CXXRecordDecl {{.*}} <{{.*}}ast-dump-constant-expr.cpp:43:1, line:57:1> line:43:8 struct Test definition -// CHECK:|-CXXMethodDecl {{.*}} line:44:8 test 'void ()' implicit-inline +// CHECK-NEXT:CXXRecordDecl {{.*}} <{{.*}}ast-dump-constant-expr.cpp:43:1, line:57:1> line:43:8 struct Test definition external-linkage +// CHECK:|-CXXMethodDecl {{.*}} line:44:8 test 'void ()' implicit-inline external-linkage // CHECK-NEXT:| `-CompoundStmt {{.*}} // CHECK-NEXT:| |-CStyleCastExpr {{.*}} 'void' // CHECK-NEXT:| | `-ConstantExpr {{.*}} 'int' @@ -90,4 +90,4 @@ struct Test { // CHECK-NEXT:| `-CallExpr {{.*}} '__int128' // CHECK-NEXT:| `-ImplicitCastExpr {{.*}} '__int128 (*)()' // CHECK-NEXT:| `-DeclRefExpr {{.*}} '__int128 ()' lvalue Function {{.*}} 'test_Int128' '__int128 ()' -// CHECK-NEXT:`-CXXMethodDecl {{.*}} col:18 consteval consteval_method 'void ()' implicit-inline +// CHECK-NEXT:`-CXXMethodDecl {{.*}} col:18 consteval consteval_method 'void ()' implicit-inline external-linkage diff --git a/clang/test/AST/ast-dump-ctad-alias.cpp b/clang/test/AST/ast-dump-ctad-alias.cpp index 9a3adbcb534e8..ea4b12da8ef78 100644 --- a/clang/test/AST/ast-dump-ctad-alias.cpp +++ b/clang/test/AST/ast-dump-ctad-alias.cpp @@ -38,10 +38,10 @@ Out2::AInner t(1.0); // CHECK-NEXT: | | `-TypeTraitExpr {{.*}} 'bool' __is_deducible // CHECK-NEXT: | | |-DeducedTemplateSpecializationType {{.*}} 'Out2::AInner' dependent // CHECK-NEXT: | | | `-name: 'Out2::AInner' -// CHECK-NEXT: | | | `-TypeAliasTemplateDecl {{.+}} AInner{{$}} +// CHECK-NEXT: | | | `-TypeAliasTemplateDecl {{.+}} AInner external-linkage{{$}} // CHECK-NEXT: | | `-TemplateSpecializationType {{.*}} 'Inner' dependent // CHECK-NEXT: | | |-name: 'Inner':'Out::Inner' qualified -// CHECK-NEXT: | | | `-ClassTemplateDecl {{.+}} Inner{{$}} +// CHECK-NEXT: | | | `-ClassTemplateDecl {{.+}} Inner external-linkage{{$}} // CHECK-NEXT: | | `-TemplateArgument type 'Y' // CHECK-NEXT: | | `-SubstTemplateTypeParmType {{.*}} 'Y' // CHECK-NEXT: | | |-FunctionTemplate {{.*}} '' diff --git a/clang/test/AST/ast-dump-decl.c b/clang/test/AST/ast-dump-decl.c index 683df50f7e91c..447c2d689cbce 100644 --- a/clang/test/AST/ast-dump-decl.c +++ b/clang/test/AST/ast-dump-decl.c @@ -172,7 +172,7 @@ extern int TestVarDeclSC; // CHECK: VarDecl{{.*}} TestVarDeclSC 'int' extern __thread int TestVarDeclThread; -// CHECK: VarDecl{{.*}} TestVarDeclThread 'int' tls{{$}} +// CHECK: VarDecl{{.*}} TestVarDeclThread 'int' tls external-linkage{{$}} __module_private__ int TestVarDeclPrivate; // CHECK-MODULE: VarDecl{{.*}} TestVarDeclPrivate 'int' __module_private__ diff --git a/clang/test/AST/ast-dump-decl.cpp b/clang/test/AST/ast-dump-decl.cpp index ecbfacaf128e2..b0d53cf1b38ca 100644 --- a/clang/test/AST/ast-dump-decl.cpp +++ b/clang/test/AST/ast-dump-decl.cpp @@ -63,19 +63,19 @@ inline namespace TestNamespaceDeclInline { namespace TestNestedNameSpace::Nested { } // CHECK: NamespaceDecl{{.*}} TestNestedNameSpace -// CHECK: NamespaceDecl{{.*}} Nested nested{{\s*$}} +// CHECK: NamespaceDecl{{.*}} Nested nested external-linkage{{\s*$}} namespace TestMultipleNested::SecondLevelNested::Nested { } // CHECK: NamespaceDecl{{.*}} TestMultipleNested // CHECK: NamespaceDecl{{.*}} SecondLevelNested nested -// CHECK: NamespaceDecl{{.*}} Nested nested{{\s*$}} +// CHECK: NamespaceDecl{{.*}} Nested nested external-linkage{{\s*$}} namespace TestInlineNested::inline SecondLevel::inline Nested { } // CHECK: NamespaceDecl{{.*}} TestInlineNested // CHECK: NamespaceDecl{{.*}} SecondLevel inline nested -// CHECK: NamespaceDecl{{.*}} Nested inline nested{{\s*$}} +// CHECK: NamespaceDecl{{.*}} Nested inline nested external-linkage{{\s*$}} namespace testUsingDirectiveDecl { namespace A { @@ -318,7 +318,7 @@ namespace testClassTemplateDecl { template class TT> struct TestTemplateTemplateDefaultType { }; } -// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-40]]:3, line:[[@LINE-34]]:3> line:[[@LINE-40]]:30 referenced TestClassTemplate{{$}} +// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-40]]:3, line:[[@LINE-34]]:3> line:[[@LINE-40]]:30 referenced TestClassTemplate external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} line:[[@LINE-42]]:30 class TestClassTemplate definition{{$}} // CHECK-NEXT: | |-DefinitionData standard_layout has_user_declared_ctor can_const_default_init{{$}} @@ -330,11 +330,11 @@ namespace testClassTemplateDecl { // CHECK-NEXT: | | `-Destructor irrelevant non_trivial user_declared{{$}} // CHECK-NEXT: | |-CXXRecordDecl 0x{{.+}} col:30 implicit referenced class TestClassTemplate{{$}} // CHECK-NEXT: | |-AccessSpecDecl 0x{{.+}} col:3 public{{$}} -// CHECK-NEXT: | |-CXXConstructorDecl 0x[[#%x,TEMPLATE_CONSTRUCTOR_DECL:]] col:5 TestClassTemplate 'void ()'{{$}} -// CHECK-NEXT: | |-CXXDestructorDecl 0x[[#%x,TEMPLATE_DESTRUCTOR_DECL:]] col:5 ~TestClassTemplate 'void ()' not_selected{{$}} -// CHECK-NEXT: | |-CXXMethodDecl 0x[[#%x,TEMPLATE_METHOD_DECL:]] col:9 j 'int ()'{{$}} +// CHECK-NEXT: | |-CXXConstructorDecl 0x[[#%x,TEMPLATE_CONSTRUCTOR_DECL:]] col:5 TestClassTemplate 'void ()' external-linkage{{$}} +// CHECK-NEXT: | |-CXXDestructorDecl 0x[[#%x,TEMPLATE_DESTRUCTOR_DECL:]] col:5 ~TestClassTemplate 'void ()' not_selected external-linkage{{$}} +// CHECK-NEXT: | |-CXXMethodDecl 0x[[#%x,TEMPLATE_METHOD_DECL:]] col:9 j 'int ()' external-linkage{{$}} // CHECK-NEXT: | `-FieldDecl 0x{{.+}} col:9 i 'int'{{$}} -// CHECK-NEXT: |-ClassTemplateSpecializationDecl 0x{{.+}} line:[[@LINE-56]]:30 referenced class TestClassTemplate definition instantiated_from 0x{{.+}} implicit_instantiation{{$}} +// CHECK-NEXT: |-ClassTemplateSpecializationDecl 0x{{.+}} line:[[@LINE-56]]:30 referenced class TestClassTemplate definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation{{$}} // CHECK-NEXT: | |-DefinitionData standard_layout has_user_declared_ctor can_const_default_init{{$}} // CHECK-NEXT: | | |-DefaultConstructor exists non_trivial user_provided{{$}} // CHECK-NEXT: | | |-CopyConstructor simple trivial has_const_param implicit_has_const_param{{$}} @@ -347,17 +347,17 @@ namespace testClassTemplateDecl { // CHECK-NEXT: | | `-CXXRecord 0x{{.+}} 'A'{{$}} // CHECK-NEXT: | |-CXXRecordDecl 0x{{.+}} col:30 implicit class TestClassTemplate{{$}} // CHECK-NEXT: | |-AccessSpecDecl 0x{{.+}} col:3 public{{$}} -// CHECK-NEXT: | |-CXXConstructorDecl 0x{{.+}} col:5 used TestClassTemplate 'void ()' implicit_instantiation instantiated_from 0x[[#TEMPLATE_CONSTRUCTOR_DECL]]{{$}} -// CHECK-NEXT: | |-CXXDestructorDecl 0x{{.+}} col:5 used ~TestClassTemplate 'void () noexcept' implicit_instantiation instantiated_from 0x[[#TEMPLATE_DESTRUCTOR_DECL]]{{$}} -// CHECK-NEXT: | |-CXXMethodDecl 0x{{.+}} col:9 j 'int ()' implicit_instantiation instantiated_from 0x[[#TEMPLATE_METHOD_DECL]]{{$}} +// CHECK-NEXT: | |-CXXConstructorDecl 0x{{.+}} col:5 used TestClassTemplate 'void ()' implicit_instantiation instantiated_from 0x[[#TEMPLATE_CONSTRUCTOR_DECL]] external-linkage{{$}} +// CHECK-NEXT: | |-CXXDestructorDecl 0x{{.+}} col:5 used ~TestClassTemplate 'void () noexcept' implicit_instantiation instantiated_from 0x[[#TEMPLATE_DESTRUCTOR_DECL]] external-linkage{{$}} +// CHECK-NEXT: | |-CXXMethodDecl 0x{{.+}} col:9 j 'int ()' implicit_instantiation instantiated_from 0x[[#TEMPLATE_METHOD_DECL]] external-linkage{{$}} // CHECK-NEXT: | |-FieldDecl 0x{{.+}} col:9 i 'int'{{$}} -// CHECK-NEXT: | `-CXXConstructorDecl 0x{{.+}} col:30 implicit constexpr TestClassTemplate 'void (const TestClassTemplate &)' inline default trivial noexcept-unevaluated 0x{{.+}}{{$}} +// CHECK-NEXT: | `-CXXConstructorDecl 0x{{.+}} col:30 implicit constexpr TestClassTemplate 'void (const TestClassTemplate &)' inline default trivial noexcept-unevaluated 0x{{.+}} external-linkage{{$}} // CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:30 'const TestClassTemplate &'{{$}} // CHECK-NEXT: |-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate'{{$}} // CHECK-NEXT: |-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate'{{$}} // CHECK-NEXT: `-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate'{{$}} -// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-67]]:3, line:[[@LINE-65]]:3> line:[[@LINE-67]]:20 class TestClassTemplate definition explicit_specialization{{$}} +// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-67]]:3, line:[[@LINE-65]]:3> line:[[@LINE-67]]:20 class TestClassTemplate definition external-linkage explicit_specialization{{$}} // CHECK-NEXT: |-DefinitionData pass_in_registers standard_layout trivially_copyable trivial literal{{$}} // CHECK-NEXT: | |-DefaultConstructor exists trivial needs_implicit{{$}} // CHECK-NEXT: | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param{{$}} @@ -371,7 +371,7 @@ namespace testClassTemplateDecl { // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:20 implicit class TestClassTemplate{{$}} // CHECK-NEXT: `-FieldDecl 0x{{.+}} col:9 j 'int'{{$}} -// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:{{.*}}:3, col:44> col:25 class TestClassTemplate definition instantiated_from 0x{{.+}} explicit_instantiation_declaration{{$}} +// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:{{.*}}:3, col:44> col:25 class TestClassTemplate definition external-linkage instantiated_from 0x{{.+}} explicit_instantiation_declaration{{$}} // CHECK-NEXT: |-DefinitionData standard_layout has_user_declared_ctor can_const_default_init{{$}} // CHECK-NEXT: | |-DefaultConstructor exists non_trivial user_provided{{$}} // CHECK-NEXT: | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param{{$}} @@ -384,12 +384,12 @@ namespace testClassTemplateDecl { // CHECK-NEXT: | `-CXXRecord 0x{{.+}} 'C'{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:30 implicit class TestClassTemplate{{$}} // CHECK-NEXT: |-AccessSpecDecl 0x{{.+}} col:3 public{{$}} -// CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:5 TestClassTemplate 'void ()' explicit_instantiation_declaration instantiated_from {{0x[^ ]+}}{{$}} -// CHECK-NEXT: |-CXXDestructorDecl 0x{{.+}} col:5 ~TestClassTemplate 'void ()' explicit_instantiation_declaration noexcept-unevaluated 0x{{[^ ]+}} instantiated_from {{0x[^ ]+}} -// CHECK-NEXT: |-CXXMethodDecl 0x{{.+}} col:9 j 'int ()' explicit_instantiation_declaration instantiated_from {{0x[^ ]+}}{{$}} +// CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:5 TestClassTemplate 'void ()' explicit_instantiation_declaration instantiated_from {{0x[^ ]+}} external-linkage{{$}} +// CHECK-NEXT: |-CXXDestructorDecl 0x{{.+}} col:5 ~TestClassTemplate 'void ()' explicit_instantiation_declaration noexcept-unevaluated 0x{{[^ ]+}} instantiated_from {{0x[^ ]+}} external-linkage{{$}} +// CHECK-NEXT: |-CXXMethodDecl 0x{{.+}} col:9 j 'int ()' explicit_instantiation_declaration instantiated_from {{0x[^ ]+}} external-linkage{{$}} // CHECK-NEXT: `-FieldDecl 0x{{.+}} col:9 i 'int'{{$}} -// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-91]]:3, col:37> col:18 class TestClassTemplate definition instantiated_from 0x{{.+}} explicit_instantiation_definition{{$}} +// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-91]]:3, col:37> col:18 class TestClassTemplate definition external-linkage instantiated_from 0x{{.+}} explicit_instantiation_definition{{$}} // CHECK-NEXT: |-DefinitionData standard_layout has_user_declared_ctor can_const_default_init{{$}} // CHECK-NEXT: | |-DefaultConstructor exists non_trivial user_provided{{$}} // CHECK-NEXT: | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param{{$}} @@ -402,12 +402,12 @@ namespace testClassTemplateDecl { // CHECK-NEXT: | `-CXXRecord 0x{{.+}} 'D'{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:30 implicit class TestClassTemplate{{$}} // CHECK-NEXT: |-AccessSpecDecl 0x{{.+}} col:3 public{{$}} -// CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:5 TestClassTemplate 'void ()' implicit_instantiation instantiated_from {{0x[^ ]+}}{{$}} -// CHECK-NEXT: |-CXXDestructorDecl 0x{{.+}} col:5 ~TestClassTemplate 'void ()' implicit_instantiation noexcept-unevaluated 0x{{.+}} instantiated_from {{0x[^ ]+}}{{$}} -// CHECK-NEXT: |-CXXMethodDecl 0x{{.+}} col:9 j 'int ()' implicit_instantiation instantiated_from {{0x[^ ]+}}{{$}} +// CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:5 TestClassTemplate 'void ()' implicit_instantiation instantiated_from {{0x[^ ]+}} external-linkage{{$}} +// CHECK-NEXT: |-CXXDestructorDecl 0x{{.+}} col:5 ~TestClassTemplate 'void ()' implicit_instantiation noexcept-unevaluated 0x{{.+}} instantiated_from {{0x[^ ]+}} external-linkage{{$}} +// CHECK-NEXT: |-CXXMethodDecl 0x{{.+}} col:9 j 'int ()' implicit_instantiation instantiated_from {{0x[^ ]+}} external-linkage{{$}} // CHECK-NEXT: `-FieldDecl 0x{{.+}} col:9 i 'int'{{$}} -// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-106]]:3, line:[[@LINE-104]]:3> line:[[@LINE-106]]:44 TestClassTemplatePartial{{$}} +// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-106]]:3, line:[[@LINE-104]]:3> line:[[@LINE-106]]:44 TestClassTemplatePartial external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T1{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:34 typename depth 0 index 1 T2{{$}} // CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} line:[[@LINE-109]]:44 class TestClassTemplatePartial definition{{$}} @@ -421,7 +421,7 @@ namespace testClassTemplateDecl { // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:44 implicit class TestClassTemplatePartial{{$}} // CHECK-NEXT: `-FieldDecl 0x{{.+}} col:9 i 'int'{{$}} -// CHECK: ClassTemplatePartialSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-117]]:3, line:[[@LINE-115]]:3> line:[[@LINE-117]]:31 class TestClassTemplatePartial definition explicit_specialization{{$}} +// CHECK: ClassTemplatePartialSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-117]]:3, line:[[@LINE-115]]:3> line:[[@LINE-117]]:31 class TestClassTemplatePartial definition external-linkage explicit_specialization{{$}} // CHECK-NEXT: |-DefinitionData standard_layout trivially_copyable trivial literal{{$}} // CHECK-NEXT: | |-DefaultConstructor exists trivial needs_implicit{{$}} // CHECK-NEXT: | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param{{$}} @@ -438,13 +438,13 @@ namespace testClassTemplateDecl { // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:31 implicit class TestClassTemplatePartial{{$}} // CHECK-NEXT: `-FieldDecl 0x{{.+}} col:9 j 'int'{{$}} -// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-130]]:3, col:37> col:37 TestTemplateDefaultType{{$}} +// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-130]]:3, col:37> col:37 TestTemplateDefaultType external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T{{$}} // CHECK-NEXT: | `-TemplateArgument type 'int'{{$}} // CHECK-NEXT: | `-BuiltinType 0x{{.+}} 'int'{{$}} // CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} col:37 struct TestTemplateDefaultType{{$}} -// CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-135]]:3, col:57> col:31 TestTemplateDefaultType{{$}} +// CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-135]]:3, col:57> col:31 TestTemplateDefaultType external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T{{$}} // CHECK-NEXT: | `-TemplateArgument type 'int'{{$}} // CHECK-NEXT: | |-inherited from TemplateTypeParm 0x{{.+}} 'T'{{$}} @@ -459,20 +459,20 @@ namespace testClassTemplateDecl { // CHECK-NEXT: | `-Destructor simple irrelevant trivial needs_implicit{{$}} // CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} col:31 implicit struct TestTemplateDefaultType{{$}} -// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-148]]:3, col:31> col:31 TestTemplateDefaultNonType{{$}} +// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-148]]:3, col:31> col:31 TestTemplateDefaultNonType external-linkage{{$}} // CHECK-NEXT: |-NonTypeTemplateParmDecl 0x{{.+}} col:16 'int' depth 0 index 0 I{{$}} // CHECK-NEXT: | `-TemplateArgument expr '42'{{$}} // CHECK-NEXT: | `-IntegerLiteral 0x{{.+}} 'int' 42{{$}} // CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} col:31 struct TestTemplateDefaultNonType{{$}} -// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:{{.*}}:3, col:68> col:68 TestTemplateTemplateDefaultType{{$}} +// CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:{{.*}}:3, col:68> col:68 TestTemplateTemplateDefaultType external-linkage{{$}} // CHECK-NEXT: |-TemplateTemplateParmDecl 0x{{.+}} col:37 depth 0 index 0 TT{{$}} // CHECK-NEXT: | |-TemplateTypeParmDecl 0x{{.+}} col:29 typename depth 1 index 0{{$}} // CHECK-NEXT: | `-TemplateArgument template 'TestClassTemplate':'testClassTemplateDecl::TestClassTemplate' qualified{{$}} -// CHECK-NEXT: | `-ClassTemplateDecl 0x{{.+}} line:{{.+}}:30 referenced TestClassTemplate{{$}} +// CHECK-NEXT: | `-ClassTemplateDecl 0x{{.+}} line:{{.+}}:30 referenced TestClassTemplate external-linkage{{$}} // CHECK-NEXT: `-CXXRecordDecl 0x{{.+}} col:68 struct TestTemplateTemplateDefaultType{{$}} -// CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:{{.*}}:3, col:82> col:48 TestTemplateTemplateDefaultType{{$}} +// CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:{{.*}}:3, col:82> col:48 TestTemplateTemplateDefaultType external-linkage{{$}} // CHECK-NEXT: |-TemplateTemplateParmDecl 0x{{.+}} col:37 depth 0 index 0 TT{{$}} // CHECK-NEXT: | |-TemplateTypeParmDecl 0x{{.+}} col:29 typename depth 1 index 0{{$}} // CHECK-NEXT: | `-TemplateArgument template 'TestClassTemplate':'testClassTemplateDecl::TestClassTemplate' qualified{{$}} @@ -518,29 +518,29 @@ namespace testClassTemplateDecl { // CHECK-NEXT: | |-EnumDecl 0x[[#%x,SCOPED_MEMBER_ENUM_E3:]] col:16 class E3 'T' // CHECK-NEXT: | `-EnumDecl 0x[[#%x,SCOPED_MEMBER_ENUM_E4:]] col:16 class E4 'int' // CHECK-NEXT: |-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplateWithScopedMemberEnum' -// CHECK-NEXT: `-ClassTemplateSpecializationDecl 0x{{.+}} line:[[@LINE-28]]:31 referenced struct TestClassTemplateWithScopedMemberEnum definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK-NEXT: `-ClassTemplateSpecializationDecl 0x{{.+}} line:[[@LINE-28]]:31 referenced struct TestClassTemplateWithScopedMemberEnum definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: |-TemplateArgument type 'int' // CHECK-NEXT: | `-BuiltinType 0x{{.+}} 'int' -// CHECK: |-EnumDecl 0x{{.+}} col:16 class E1 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E1]]{{$}} -// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E2 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E2]]{{$}} -// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E3 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E3]]{{$}} -// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E4 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E4]]{{$}} +// CHECK: |-EnumDecl 0x{{.+}} col:16 class E1 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E1]] external-linkage{{$}} +// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E2 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E2]] external-linkage{{$}} +// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E3 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E3]] external-linkage{{$}} +// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E4 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E4]] external-linkage{{$}} -// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-29]]:3, col:65> col:19 struct TestClassTemplateWithScopedMemberEnum definition instantiated_from 0x{{.+}} explicit_instantiation_definition +// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-29]]:3, col:65> col:19 struct TestClassTemplateWithScopedMemberEnum definition external-linkage instantiated_from 0x{{.+}} explicit_instantiation_definition // CHECK: |-TemplateArgument type 'unsigned int' // CHECK-NEXT: | `-BuiltinType 0x{{.+}} 'unsigned int' -// CHECK: |-EnumDecl 0x{{.+}} col:16 class E1 'unsigned int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E1]]{{$}} +// CHECK: |-EnumDecl 0x{{.+}} col:16 class E1 'unsigned int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E1]] external-linkage{{$}} // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:25 A 'testClassTemplateDecl::TestClassTemplateWithScopedMemberEnum::E1' // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:28 B 'testClassTemplateDecl::TestClassTemplateWithScopedMemberEnum::E1' // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:31 C 'testClassTemplateDecl::TestClassTemplateWithScopedMemberEnum::E1' // CHECK-NEXT: | `-EnumConstantDecl 0x{{.+}} col:34 D 'testClassTemplateDecl::TestClassTemplateWithScopedMemberEnum::E1' -// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E2 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E2]]{{$}} +// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E2 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E2]] external-linkage{{$}} // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:27 A 'testClassTemplateDecl::TestClassTemplateWithScopedMemberEnum::E2' // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:30 B 'testClassTemplateDecl::TestClassTemplateWithScopedMemberEnum::E2' // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:33 C 'testClassTemplateDecl::TestClassTemplateWithScopedMemberEnum::E2' // CHECK-NEXT: | `-EnumConstantDecl 0x{{.+}} col:36 D 'testClassTemplateDecl::TestClassTemplateWithScopedMemberEnum::E2' -// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E3 'unsigned int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E3]]{{$}} -// CHECK-NEXT: `-EnumDecl 0x{{.+}} col:16 class E4 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E4]]{{$}} +// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:16 class E3 'unsigned int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E3]] external-linkage{{$}} +// CHECK-NEXT: `-EnumDecl 0x{{.+}} col:16 class E4 'int' instantiated_from 0x[[#SCOPED_MEMBER_ENUM_E4]] external-linkage{{$}} @@ -575,21 +575,21 @@ namespace testClassTemplateDecl { // CHECK-NEXT: | `-EnumDecl 0x[[#%x,UNSCOPED_MEMBER_ENUM_E4:]] col:10 E4 'int' // CHECK-NEXT: `-ClassTemplateSpecialization {{.+}} 'TestClassTemplateWithUnscopedMemberEnum' -// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-22]]:3, col:67> col:19 referenced struct TestClassTemplateWithUnscopedMemberEnum definition instantiated_from 0x{{.+}} explicit_instantiation_definition +// CHECK: ClassTemplateSpecializationDecl 0x{{.+}} <{{.+}}:[[@LINE-22]]:3, col:67> col:19 referenced struct TestClassTemplateWithUnscopedMemberEnum definition external-linkage instantiated_from 0x{{.+}} explicit_instantiation_definition // CHECK: |-TemplateArgument type 'unsigned int' // CHECK-NEXT: | `-BuiltinType 0x{{.+}} 'unsigned int' -// CHECK: |-EnumDecl 0x{{.+}} col:10 E1 'unsigned int' instantiated_from 0x[[#UNSCOPED_MEMBER_ENUM_E1]]{{$}} +// CHECK: |-EnumDecl 0x{{.+}} col:10 E1 'unsigned int' instantiated_from 0x[[#UNSCOPED_MEMBER_ENUM_E1]] external-linkage{{$}} // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:19 E1_A 'testClassTemplateDecl::TestClassTemplateWithUnscopedMemberEnum::E1' // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:25 E1_B 'testClassTemplateDecl::TestClassTemplateWithUnscopedMemberEnum::E1' // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:31 E1_C 'testClassTemplateDecl::TestClassTemplateWithUnscopedMemberEnum::E1' // CHECK-NEXT: | `-EnumConstantDecl 0x{{.+}} col:37 E1_D 'testClassTemplateDecl::TestClassTemplateWithUnscopedMemberEnum::E1' -// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:10 E2 'int' instantiated_from 0x[[#UNSCOPED_MEMBER_ENUM_E2]]{{$}} +// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:10 E2 'int' instantiated_from 0x[[#UNSCOPED_MEMBER_ENUM_E2]] external-linkage{{$}} // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:21 E2_A 'testClassTemplateDecl::TestClassTemplateWithUnscopedMemberEnum::E2' // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:27 E2_B 'testClassTemplateDecl::TestClassTemplateWithUnscopedMemberEnum::E2' // CHECK-NEXT: | |-EnumConstantDecl 0x{{.+}} col:33 E2_C 'testClassTemplateDecl::TestClassTemplateWithUnscopedMemberEnum::E2' // CHECK-NEXT: | `-EnumConstantDecl 0x{{.+}} col:39 E2_D 'testClassTemplateDecl::TestClassTemplateWithUnscopedMemberEnum::E2' -// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:10 E3 'unsigned int' instantiated_from 0x[[#UNSCOPED_MEMBER_ENUM_E3]]{{$}} -// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:10 E4 'int' instantiated_from 0x[[#UNSCOPED_MEMBER_ENUM_E4]]{{$}} +// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:10 E3 'unsigned int' instantiated_from 0x[[#UNSCOPED_MEMBER_ENUM_E3]] external-linkage{{$}} +// CHECK-NEXT: |-EnumDecl 0x{{.+}} col:10 E4 'int' instantiated_from 0x[[#UNSCOPED_MEMBER_ENUM_E4]] external-linkage{{$}} // PR15220 dump instantiation only once @@ -599,7 +599,7 @@ namespace testCanonicalTemplate { template void TestFunctionTemplate(T); template void TestFunctionTemplate(T); void bar(A a) { TestFunctionTemplate(a); } - // CHECK: FunctionTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-3]]:3, col:51> col:29 TestFunctionTemplate{{$}} + // CHECK: FunctionTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-3]]:3, col:51> col:29 TestFunctionTemplate external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 referenced typename depth 0 index 0 T{{$}} // CHECK-NEXT: |-FunctionDecl 0x{{.*}} col:29 TestFunctionTemplate 'void (T)'{{$}} // CHECK-NEXT: | `-ParmVarDecl 0x{{.*}} col:51 'T'{{$}} @@ -609,7 +609,7 @@ namespace testCanonicalTemplate { // CHECK-NEXT: | `-CXXRecord 0x{{.+}} 'A'{{$}} // CHECK-NEXT: `-ParmVarDecl 0x{{.*}} col:51 'testCanonicalTemplate::A'{{$}} - // CHECK: FunctionTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-12]]:3, col:51> col:29 TestFunctionTemplate{{$}} + // CHECK: FunctionTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-12]]:3, col:51> col:29 TestFunctionTemplate external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 referenced typename depth 0 index 0 T{{$}} // CHECK-NEXT: |-FunctionDecl{{.*}} 0x{{.+}} prev 0x{{.+}} col:29 TestFunctionTemplate 'void (T)'{{$}} // CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:51 'T'{{$}} @@ -620,7 +620,7 @@ namespace testCanonicalTemplate { template friend class TestClassTemplate; }; TestClassTemplate a; - // CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-4]]:3, line:[[@LINE-2]]:3> line:[[@LINE-4]]:31 referenced TestClassTemplate{{$}} + // CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-4]]:3, line:[[@LINE-2]]:3> line:[[@LINE-4]]:31 referenced TestClassTemplate external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T1{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} line:[[@LINE-6]]:31 class TestClassTemplate definition{{$}} // CHECK-NEXT: | |-DefinitionData empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init{{$}} @@ -632,10 +632,10 @@ namespace testCanonicalTemplate { // CHECK-NEXT: | | `-Destructor simple irrelevant trivial needs_implicit{{$}} // CHECK-NEXT: | |-CXXRecordDecl 0x{{.+}} col:31 implicit class TestClassTemplate{{$}} // CHECK-NEXT: | `-FriendDecl 0x{{.+}} col:40{{$}} - // CHECK-NEXT: | `-ClassTemplateDecl 0x{{.+}} parent 0x{{.+}} col:40 friend_undeclared TestClassTemplate{{$}} + // CHECK-NEXT: | `-ClassTemplateDecl 0x{{.+}} parent 0x{{.+}} col:40 friend_undeclared TestClassTemplate external-linkage{{$}} // CHECK-NEXT: | |-TemplateTypeParmDecl 0x{{.+}} col:23 typename depth 1 index 0 T2{{$}} // CHECK-NEXT: | `-CXXRecordDecl 0x{{.+}} parent 0x{{.+}} col:40 class TestClassTemplate{{$}} - // CHECK-NEXT: `-ClassTemplateSpecializationDecl 0x{{.+}} line:[[@LINE-19]]:31 referenced class TestClassTemplate definition instantiated_from 0x{{.+}} implicit_instantiation{{$}} + // CHECK-NEXT: `-ClassTemplateSpecializationDecl 0x{{.+}} line:[[@LINE-19]]:31 referenced class TestClassTemplate definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation{{$}} // CHECK-NEXT: |-DefinitionData pass_in_registers empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init{{$}} // CHECK-NEXT: | |-DefaultConstructor exists trivial constexpr defaulted_is_constexpr{{$}} // CHECK-NEXT: | |-CopyConstructor simple trivial has_const_param implicit_has_const_param{{$}} @@ -648,11 +648,11 @@ namespace testCanonicalTemplate { // CHECK-NEXT: | `-CXXRecord 0x{{.+}} 'A'{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:31 implicit class TestClassTemplate{{$}} // CHECK-NEXT: |-FriendDecl 0x{{.+}} col:40{{$}} - // CHECK-NEXT: | `-ClassTemplateDecl 0x{{.+}} parent 0x{{.+}} prev 0x{{.+}} col:40 friend TestClassTemplate{{$}} + // CHECK-NEXT: | `-ClassTemplateDecl 0x{{.+}} parent 0x{{.+}} prev 0x{{.+}} col:40 friend TestClassTemplate external-linkage{{$}} // CHECK-NEXT: | |-TemplateTypeParmDecl 0x{{.+}} col:23 typename depth 0 index 0 T2{{$}} // CHECK-NEXT: | |-CXXRecordDecl 0x{{.+}} parent 0x{{.+}} prev 0x{{.+}} col:40 class TestClassTemplate{{$}} // CHECK-NEXT: | `-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate'{{$}} - // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit used constexpr TestClassTemplate 'void () noexcept' inline default trivial{{$}} + // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit used constexpr TestClassTemplate 'void () noexcept' inline default trivial external-linkage{{$}} // CHECK-NEXT: | `-CompoundStmt 0x{{.+}} {{$}} // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate 'void (const TestClassTemplate &)' inline default trivial noexcept-unevaluated 0x{{.+}}{{$}} // CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:31 'const TestClassTemplate &'{{$}} @@ -665,10 +665,10 @@ namespace testCanonicalTemplate { template class TestClassTemplate2 { }; TestClassTemplate2 a2; - // CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-5]]:3, col:31> col:31 TestClassTemplate2{{$}} + // CHECK: ClassTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-5]]:3, col:31> col:31 TestClassTemplate2 external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T1{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:31 class TestClassTemplate2{{$}} - // CHECK-NEXT: `-ClassTemplateSpecializationDecl 0x{{.+}} line:[[@LINE-6]]:31 referenced class TestClassTemplate2 definition instantiated_from 0x{{.+}} implicit_instantiation{{$}} + // CHECK-NEXT: `-ClassTemplateSpecializationDecl 0x{{.+}} line:[[@LINE-6]]:31 referenced class TestClassTemplate2 definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation{{$}} // CHECK-NEXT: |-DefinitionData pass_in_registers empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init{{$}} // CHECK-NEXT: | |-DefaultConstructor exists trivial constexpr defaulted_is_constexpr{{$}} // CHECK-NEXT: | |-CopyConstructor simple trivial has_const_param implicit_has_const_param{{$}} @@ -680,19 +680,19 @@ namespace testCanonicalTemplate { // CHECK-NEXT: | `-RecordType 0x{{.+}} 'testCanonicalTemplate::A' canonical{{$}} // CHECK-NEXT: | `-CXXRecord 0x{{.+}} 'A'{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} col:31 implicit class TestClassTemplate2{{$}} - // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit used constexpr TestClassTemplate2 'void () noexcept' inline default trivial{{$}} + // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit used constexpr TestClassTemplate2 'void () noexcept' inline default trivial external-linkage{{$}} // CHECK-NEXT: | `-CompoundStmt 0x{{.+}} {{$}} // CHECK-NEXT: |-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate2 'void (const TestClassTemplate2 &)' inline default trivial noexcept-unevaluated 0x{{.+}}{{$}} // CHECK-NEXT: | `-ParmVarDecl 0x{{.+}} col:31 'const TestClassTemplate2 &'{{$}} // CHECK-NEXT: `-CXXConstructorDecl 0x{{.+}} col:31 implicit constexpr TestClassTemplate2 'void (TestClassTemplate2 &&)' inline default trivial noexcept-unevaluated 0x{{.+}}{{$}} // CHECK-NEXT: `-ParmVarDecl 0x{{.+}} col:31 'TestClassTemplate2 &&'{{$}} - // CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-26]]:3, col:31> col:31 TestClassTemplate2{{$}} + // CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-26]]:3, col:31> col:31 TestClassTemplate2 external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T1{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} prev 0x{{.+}} col:31 class TestClassTemplate2{{$}} // CHECK-NEXT: `-ClassTemplateSpecialization 0x{{.+}} 'TestClassTemplate2'{{$}} - // CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-30]]:3, line:[[@LINE-29]]:3> line:[[@LINE-30]]:31 referenced TestClassTemplate2{{$}} + // CHECK: ClassTemplateDecl 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-30]]:3, line:[[@LINE-29]]:3> line:[[@LINE-30]]:31 referenced TestClassTemplate2 external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T1{{$}} // CHECK-NEXT: |-CXXRecordDecl 0x{{.+}} prev 0x{{.+}} line:[[@LINE-32]]:31 class TestClassTemplate2 definition{{$}} // CHECK-NEXT: | |-DefinitionData empty aggregate standard_layout trivially_copyable pod trivial literal has_constexpr_non_copy_move_ctor can_const_default_init{{$}} @@ -717,7 +717,7 @@ namespace testCanonicalTemplate { int j = S::TestVarTemplate; } - // CHECK: VarTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-11]]:7, col:43> col:43 TestVarTemplate{{$}} + // CHECK: VarTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-11]]:7, col:43> col:43 TestVarTemplate external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:25 referenced typename depth 0 index 0 T{{$}} // CHECK-NEXT: |-VarDecl 0x{{.+}} col:43 TestVarTemplate 'const T' static instantiated_from 0x{{.+}}{{$}} // CHECK-NEXT: |-VarTemplateSpecializationDecl 0x{{.+}} parent 0x{{.+}} prev 0x{{.+}} col:14 referenced TestVarTemplate 'const int' implicit_instantiation cinit instantiated_from 0x{{.+}}{{$}} @@ -732,7 +732,7 @@ namespace testCanonicalTemplate { // CHECK-NEXT:`-TemplateArgument type 'int'{{$}} // CHECK-NEXT: `-BuiltinType 0x{{.+}} 'int'{{$}} - // CHECK: VarTemplateDecl 0x{{.+}} parent 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-24]]:3, line:[[@LINE-23]]:34> col:14 TestVarTemplate{{$}} + // CHECK: VarTemplateDecl 0x{{.+}} parent 0x{{.+}} prev 0x{{.+}} <{{.+}}:[[@LINE-24]]:3, line:[[@LINE-23]]:34> col:14 TestVarTemplate external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 referenced typename depth 0 index 0 T{{$}} // CHECK-NEXT: |-VarDecl 0x{{.+}} parent 0x{{.+}} prev 0x{{.+}} col:14 TestVarTemplate 'const T' cinit instantiated_from 0x{{.+}}{{$}} // CHECK-NEXT: | |-NestedNameSpecifier TypeSpec 'S'{{$}} @@ -908,7 +908,7 @@ template class TestFriendDecl { namespace TestFileScopeAsmDecl { asm("ret"); } -// CHECK: NamespaceDecl{{.*}} TestFileScopeAsmDecl{{$}} +// CHECK: NamespaceDecl{{.*}} TestFileScopeAsmDecl external-linkage{{$}} // CHECK: FileScopeAsmDecl{{.*> .*$}} // CHECK-NEXT: StringLiteral @@ -943,13 +943,13 @@ namespace Comment { namespace TestConstexprVariableTemplateWithInitializer { template constexpr T foo{}; - // CHECK: VarTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-1]]:3, col:40> col:36 foo{{$}} + // CHECK: VarTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-1]]:3, col:40> col:36 foo external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 referenced typename depth 0 index 0 T{{$}} // CHECK-NEXT: `-VarDecl 0x{{.+}} col:36 foo 'const T' constexpr listinit instantiated_from 0x{{.+}}{{$}} // CHECK-NEXT: `-InitListExpr 0x{{.+}} 'void'{{$}} template constexpr int val{42}; - // CHECK: VarTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-1]]:3, col:44> col:38 val{{$}} + // CHECK: VarTemplateDecl 0x{{.+}} <{{.+}}:[[@LINE-1]]:3, col:44> col:38 val external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:21 typename depth 0 index 0 T{{$}} // CHECK-NEXT: `-VarDecl 0x{{.+}} col:38 val 'const int' constexpr listinit instantiated_from 0x{{.+}}{{$}} // CHECK-NEXT: |-value: Int 42{{$}} @@ -962,13 +962,13 @@ namespace TestConstexprVariableTemplateWithInitializer { template inline constexpr in_place_type_t<_Tp> in_place_type{}; - // CHECK: -VarTemplateDecl 0x{{.+}} col:41 in_place_type{{$}} + // CHECK: -VarTemplateDecl 0x{{.+}} col:41 in_place_type external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:22 referenced typename depth 0 index 0 _Tp{{$}} // CHECK-NEXT: `-VarDecl 0x{{.+}} col:41 in_place_type 'const in_place_type_t<_Tp>' inline constexpr listinit instantiated_from 0x{{.+}}{{$}} // CHECK-NEXT: `-InitListExpr 0x{{.+}} 'void'{{$}} template constexpr T call_init(0); - // CHECK: -VarTemplateDecl 0x{{.+}} col:37 call_init{{$}} + // CHECK: -VarTemplateDecl 0x{{.+}} col:37 call_init external-linkage{{$}} // CHECK-NEXT: |-TemplateTypeParmDecl 0x{{.+}} col:22 referenced typename depth 0 index 0 T{{$}} // CHECK-NEXT: `-VarDecl 0x{{.+}} col:37 call_init 'const T' constexpr callinit instantiated_from 0x{{.+}}{{$}} // CHECK-NEXT: `-ParenListExpr 0x{{.+}} 'NULL TYPE'{{$}} diff --git a/clang/test/AST/ast-dump-lambda.cpp b/clang/test/AST/ast-dump-lambda.cpp index a4d3fe4fbda57..30577fd63feaf 100644 --- a/clang/test/AST/ast-dump-lambda.cpp +++ b/clang/test/AST/ast-dump-lambda.cpp @@ -36,7 +36,7 @@ template void test(Ts... a) { [] [[noreturn]] () {}; } // CHECK:Dumping test: -// CHECK-NEXT:FunctionTemplateDecl {{.*}} <{{.*}}ast-dump-lambda.cpp:15:1, line:37:1> line:15:32{{( imported)?}} test +// CHECK-NEXT:FunctionTemplateDecl {{.*}} <{{.*}}ast-dump-lambda.cpp:15:1, line:37:1> line:15:32{{( imported)?}} test external-linkage // CHECK-NEXT:|-TemplateTypeParmDecl {{.*}} col:23{{( imported)?}} referenced typename depth 0 index 0 ... Ts // CHECK-NEXT:`-FunctionDecl {{.*}} line:15:32{{( imported)?}} test 'void (Ts...)' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:43{{( imported)?}} referenced a 'Ts...' pack diff --git a/clang/test/AST/ast-dump-linkage-internal.cpp b/clang/test/AST/ast-dump-linkage-internal.cpp new file mode 100644 index 0000000000000..49f5b3124450b --- /dev/null +++ b/clang/test/AST/ast-dump-linkage-internal.cpp @@ -0,0 +1,477 @@ +// RUN: %clang_cc1 -ast-dump -std=c++2c %s | FileCheck --match-full-lines %s + +namespace std { +template +struct initializer_list { + const T* begin; + const T* end; +}; +} // namespace std + +namespace { +// CHECK: |-NamespaceDecl {{.*}} external-linkage +// FIXME: Unnamed namespaces have internal linkage. + +typedef int TypedefInt; +// CHECK: | |-TypedefDecl {{.*}} TypedefInt 'int' + +using UsingInt = int; +// CHECK: | |-TypeAliasDecl {{.*}} UsingInt 'int' + +template +using TemplateUsingInt = T; +// CHECK: | |-TypeAliasTemplateDecl {{.*}} TemplateUsingInt internal-linkage +// CHECK: | | `-TypeAliasDecl {{.*}} TemplateUsingInt 'T' + +typedef struct {} TypedefUnnamedStruct; +// CHECK: | |-TypedefDecl {{.*}} TypedefUnnamedStruct 'struct TypedefUnnamedStruct' internal-linkage +// CHECK: | | `-RecordType {{.*}} 'struct TypedefUnnamedStruct' owns_tag struct + +using UsingUnnamedStruct = struct {}; +// CHECK: | |-TypeAliasDecl {{.*}} UsingUnnamedStruct 'struct UsingUnnamedStruct' internal-linkage +// CHECK: | | `-RecordType {{.*}} 'struct UsingUnnamedStruct' owns_tag struct + +typedef struct TypedefNamedStruct {} TypedefNameForNamedStruct; +// CHECK: | |-CXXRecordDecl {{.*}} struct TypedefNamedStruct definition internal-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} implicit struct TypedefNamedStruct +// CHECK: | |-TypedefDecl {{.*}} TypedefNameForNamedStruct 'struct TypedefNamedStruct' +// CHECK: | | `-RecordType {{.*}} 'struct TypedefNamedStruct' owns_tag struct +// CHECK: | | `-CXXRecord {{.*}} 'TypedefNamedStruct' + +using AliasForNamedStruct = struct UsingNamedStruct {}; +// CHECK: | |-CXXRecordDecl {{.*}} struct UsingNamedStruct definition internal-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} implicit struct UsingNamedStruct +// CHECK: | |-TypeAliasDecl {{.*}} AliasForNamedStruct 'struct UsingNamedStruct' +// CHECK: | | `-RecordType {{.*}} 'struct UsingNamedStruct' owns_tag struct +// CHECK: | | `-CXXRecord {{.*}} 'UsingNamedStruct' + +typedef enum {} TypedefUnnamedEnum; +// CHECK: | |-TypedefDecl {{.*}} TypedefUnnamedEnum 'enum TypedefUnnamedEnum' internal-linkage +// CHECK: | | `-EnumType {{.*}} 'enum TypedefUnnamedEnum' owns_tag enum + +using UsingUnnamedEnum = enum {}; +// CHECK: | |-TypeAliasDecl {{.*}} UsingUnnamedEnum 'enum UsingUnnamedEnum' internal-linkage +// CHECK: | | `-EnumType {{.*}} 'enum UsingUnnamedEnum' owns_tag enum + +enum Enum {}; +// CHECK: | |-EnumDecl {{.*}} Enum internal-linkage + +enum { Enumerator }; +// CHECK: | |-EnumDecl {{.*}} internal-linkage +// CHECK: | | `-EnumConstantDecl {{.*}} referenced Enumerator '(anonymous namespace)::(unnamed enum at {{.*}})' + +decltype(Enumerator) f(); +// CHECK: | |-FunctionDecl {{.*}} f 'decltype(Enumerator) ()' internal-linkage + +auto [Binding1, Binding2] = {3, 4}; +// CHECK: | |-BindingDecl {{.*}} Binding1 'const int *' +// CHECK: | |-BindingDecl {{.*}} Binding2 'const int *' +// CHECK: | |-DecompositionDecl {{.*}} used 'std::initializer_list' cinit internal-linkage +// CHECK: | | |-BindingDecl {{.*}} Binding1 'const int *' +// CHECK: | | `-BindingDecl {{.*}} Binding2 'const int *' +// FIXME: Why BindingDecls are duplicated? + +int Int = 0; +// CHECK: | |-VarDecl {{.*}} Int 'int' cinit internal-linkage + +const int ConstInt = 0; +// CHECK: | |-VarDecl {{.*}} ConstInt 'const int' cinit internal-linkage + +template +T TemplatedVar = T{}; +// CHECK: | |-VarTemplateDecl {{.*}} TemplatedVar internal-linkage +// CHECK: | | |-VarDecl {{.*}} TemplatedVar 'T' cinit instantiated_from 0x{{[0-9a-f]*}} +// CHECK: | | `-VarTemplateSpecializationDecl {{.*}} used TemplatedVar 'int' implicit_instantiation cinit instantiated_from 0x{{[0-9a-f]*}} internal-linkage + +// FIXME: VarTemplateSpecializationDecl node is printed twice. + +int TemplatedVarSpec = TemplatedVar; +// CHECK: | |-VarDecl {{.*}} TemplatedVarSpec 'int' cinit internal-linkage +// CHECK: | |-VarTemplateSpecializationDecl {{.*}} used TemplatedVar 'int' implicit_instantiation cinit instantiated_from 0x{{[0-9a-f]*}} internal-linkage + +void FuncDef() { +// CHECK: | |-FunctionDecl {{.*}} FuncDef 'void ()' internal-linkage + + extern int Int; +// CHECK: | | | `-VarDecl {{.*}} Int 'int' extern internal-linkage + extern const int ConstInt; +// CHECK: | | | `-VarDecl {{.*}} ConstInt 'const int' extern internal-linkage + void FuncDecl(); +// CHECK: | | | `-FunctionDecl {{.*}} FuncDecl 'void ()' internal-linkage + extern void FuncDecl(); +// CHECK: | | | `-FunctionDecl {{.*}} FuncDecl 'void ()' extern internal-linkage + { + int Int; +// CHECK: | | | `-VarDecl {{.*}} Int 'int' + { + extern int Int; +// CHECK: | | | `-VarDecl {{.*}} Int 'int' extern internal-linkage + extern const int ConstInt; +// CHECK: | | `-VarDecl {{.*}} ConstInt 'const int' extern internal-linkage + } + } +} + +template +void TemplatedFuncDef() {} +// CHECK: | |-FunctionTemplateDecl {{.*}} TemplatedFuncDef internal-linkage +// CHECK: | | `-FunctionDecl {{.*}} TemplatedFuncDef 'void ()' + +namespace Known { + +void FuncDecl(); +// CHECK: | | |-FunctionDecl {{.*}} FuncDecl 'void ()' internal-linkage + +constexpr void ConstexprFuncDecl(); +// CHECK: | | |-FunctionDecl{{.*}} constexpr ConstexprFuncDecl 'void ()' implicit-inline internal-linkage + +consteval void ConstevalFuncDecl(); +// CHECK: | | |-FunctionDecl{{.*}} consteval ConstevalFuncDecl 'void ()' implicit-inline internal-linkage +// FIXME: Why consteval functions have linkage? + +template +void TemplatedFuncDecl(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} TemplatedFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} TemplatedFuncDecl 'void ()' + +template +constexpr void TemplatedConstexprFuncDecl(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} TemplatedConstexprFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} constexpr TemplatedConstexprFuncDecl 'void ()' implicit-inline + +template +consteval void TemplatedConstevalFuncDecl(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} TemplatedConstevalFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} consteval TemplatedConstevalFuncDecl 'void ()' implicit-inline +// FIXME: Should consteval function templates have linkage? + +struct FriendStruct; +// CHECK: | | |-CXXRecordDecl {{.*}} struct FriendStruct internal-linkage + +template +struct FriendStructTemplate; +// CHECK: | | `-ClassTemplateDecl {{.*}} FriendStructTemplate internal-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} struct FriendStructTemplate + +} // namespace Known + +namespace N { +// CHECK-LABEL: | |-NamespaceDecl {{.*}} N internal-linkage + +struct Struct { +// CHECK: | | `-CXXRecordDecl {{.*}} struct Struct definition internal-linkage +// CHECK: | | |-CXXRecordDecl {{.*}} implicit struct Struct + + friend struct UnknownFriendStruct; +// CHECK: | | |-FriendDecl {{.*}} 'struct UnknownFriendStruct' +// CHECK: | | | `-CXXRecordDecl {{.*}} friend_undeclared struct UnknownFriendStruct internal-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + template + friend struct UnknownFriendStructTemplate; +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-ClassTemplateDecl {{.*}} friend_undeclared UnknownFriendStructTemplate internal-linkage +// CHECK: | | | `-CXXRecordDecl {{.*}} struct UnknownFriendStructTemplate +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + friend struct Known::FriendStruct; +// CHECK: | | |-FriendDecl {{.*}} 'struct Known::FriendStruct' + + template + friend struct Known::FriendStructTemplate; +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-ClassTemplateDecl {{.*}} friend FriendStructTemplate internal-linkage +// CHECK: | | | `-CXXRecordDecl {{.*}} struct FriendStructTemplate + + friend void UnknownFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} friend_undeclared UnknownFuncDecl 'void ()' internal-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + friend constexpr void UnknownConstexprFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} constexpr friend_undeclared UnknownConstexprFuncDecl 'void ()' implicit-inline internal-linkage + + friend consteval void UnknownConstevalFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} consteval friend_undeclared UnknownConstevalFuncDecl 'void ()' implicit-inline internal-linkage + + template + friend void UnknownFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownFuncDecl internal-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + template + friend constexpr void UnknownConstexprFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownConstexprFuncDecl internal-linkage + + template + friend consteval void UnknownConstevalFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownConstevalFuncDecl internal-linkage + + friend void Known::FuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} friend FuncDecl 'void ()' internal-linkage + + template + friend void Known::TemplatedFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend TemplatedFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} friend TemplatedFuncDecl 'void ()' + + template + friend constexpr void Known::TemplatedConstexprFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend TemplatedConstexprFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} constexpr friend TemplatedConstexprFuncDecl 'void ()' implicit-inline + + template + friend consteval void Known::TemplatedConstevalFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend TemplatedConstevalFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} consteval friend TemplatedConstevalFuncDecl 'void ()' implicit-inline + + friend void HiddenFriend() {} +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} friend_undeclared HiddenFriend 'void ()' implicit-inline internal-linkage + + template + friend void HiddenFriendTemplate() {} +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend_undeclared HiddenFriendTemplate internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} friend_undeclared HiddenFriendTemplate 'void ()' implicit-inline + + int NonStaticDataMember; +// CHECK: | | |-FieldDecl {{.*}} NonStaticDataMember 'int' + + static int StaticDataMember; +// CHECK: | | |-VarDecl {{.*}} StaticDataMember 'int' static internal-linkage + + void NonStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} NonStaticMemberFunction 'void ()' internal-linkage + + constexpr void ConstexprNonStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} constexpr ConstexprNonStaticMemberFunction 'void ()' implicit-inline internal-linkage + + consteval void ConstevalNonStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} consteval ConstevalNonStaticMemberFunction 'void ()' implicit-inline internal-linkage + + template + void NonStaticMemberFunctionTemplate(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} NonStaticMemberFunctionTemplate internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} NonStaticMemberFunctionTemplate 'void ()' + + template + constexpr void ConstexprNonStaticMemberFunction(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} ConstexprNonStaticMemberFunction internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} constexpr ConstexprNonStaticMemberFunction 'void ()' implicit-inline + + template + consteval void ConstevalNonStaticMemberFunction(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} ConstevalNonStaticMemberFunction internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} consteval ConstevalNonStaticMemberFunction 'void ()' implicit-inline + + static void StaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} StaticMemberFunction 'void ()' static internal-linkage + + constexpr static void ConstexprStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} constexpr ConstexprStaticMemberFunction 'void ()' static implicit-inline internal-linkage + + consteval static void ConstevalStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} consteval ConstevalStaticMemberFunction 'void ()' static implicit-inline internal-linkage + + template + static void StaticMemberFunctionTemplate(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} StaticMemberFunctionTemplate internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} StaticMemberFunctionTemplate 'void ()' static + + template + constexpr static void ConstexprStaticMemberFunctionTemplate(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} ConstexprStaticMemberFunctionTemplate internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} ConstexprStaticMemberFunctionTemplate 'void ()' static implicit-inline + + template + consteval static void ConstevalStaticMemberFunctionTemplate(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} ConstevalStaticMemberFunctionTemplate internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} ConstevalStaticMemberFunctionTemplate 'void ()' static implicit-inline + + struct NestedStruct {}; +// CHECK: | | |-CXXRecordDecl {{.*}} struct NestedStruct definition internal-linkage +// CHECK: | | | `-CXXRecordDecl {{.*}} implicit struct NestedStruct + + template + struct NestedStructTemplate {}; +// CHECK: | | `-ClassTemplateDecl {{.*}} NestedStructTemplate internal-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} struct NestedStructTemplate definition +// CHECK: | | `-CXXRecordDecl {{.*}} implicit struct NestedStructTemplate +}; + +} // namespace N + +namespace M { +// CHECK-LABEL: | |-NamespaceDecl {{.*}} M internal-linkage +template +struct StructTemplate { +// CHECK: | | `-ClassTemplateDecl {{.*}} StructTemplate internal-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} struct StructTemplate definition +// CHECK: | | |-CXXRecordDecl {{.*}} implicit struct StructTemplate + + friend struct UnknownFriendStruct; +// CHECK: | | |-FriendDecl {{.*}} 'struct UnknownFriendStruct' +// CHECK: | | | `-CXXRecordDecl {{.*}} friend_undeclared struct UnknownFriendStruct internal-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + template + friend struct UnknownFriendStructTemplate; +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-ClassTemplateDecl {{.*}} friend_undeclared UnknownFriendStructTemplate internal-linkage +// CHECK: | | | `-CXXRecordDecl {{.*}} struct UnknownFriendStructTemplate +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + friend struct Known::FriendStruct; +// CHECK: | | |-FriendDecl {{.*}} 'struct Known::FriendStruct' + + template + friend struct Known::FriendStructTemplate; +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-ClassTemplateDecl {{.*}} friend_undeclared FriendStructTemplate internal-linkage +// CHECK: | | | `-CXXRecordDecl {{.*}} struct FriendStructTemplate +// FIXME: friend_undeclared is the wrong answer; friends with qualified-id +// have to correspond to one or more declarations found by name lookup. + + friend void UnknownFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} friend_undeclared UnknownFuncDecl 'void ()' internal-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + friend constexpr void UnknownConstexprFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} constexpr friend_undeclared UnknownConstexprFuncDecl 'void ()' implicit-inline internal-linkage + + friend consteval void UnknownConstevalFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} consteval friend_undeclared UnknownConstevalFuncDecl 'void ()' implicit-inline internal-linkage + + template + friend void UnknownFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownFuncDecl internal-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + template + friend constexpr void UnknownConstexprFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownConstexprFuncDecl internal-linkage + + template + friend consteval void UnknownConstevalFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownConstevalFuncDecl internal-linkage + + friend void Known::FuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} friend_undeclared FuncDecl 'void ()' internal-linkage +// FIXME: friend_undeclared is the wrong answer; friends with qualified-id +// have to correspond to one or more declarations found by name lookup. + + template + friend void Known::TemplatedFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend TemplatedFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} friend TemplatedFuncDecl 'void ()' + + template + friend constexpr void Known::TemplatedConstexprFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend TemplatedConstexprFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} constexpr friend TemplatedConstexprFuncDecl 'void ()' implicit-inline + + template + friend consteval void Known::TemplatedConstevalFuncDecl(); +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend TemplatedConstevalFuncDecl internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} consteval friend TemplatedConstevalFuncDecl 'void ()' implicit-inline + + friend void HiddenFriend() {} +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionDecl {{.*}} friend_undeclared HiddenFriend 'void ()' implicit-inline internal-linkage + + template + friend void HiddenFriendTemplate() {} +// CHECK: | | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | | `-FunctionTemplateDecl {{.*}} friend_undeclared HiddenFriendTemplate internal-linkage +// CHECK: | | | `-FunctionDecl {{.*}} friend_undeclared HiddenFriendTemplate 'void ()' implicit-inline + + int NonStaticDataMember; +// CHECK: | | |-FieldDecl {{.*}} NonStaticDataMember 'int' + + static int StaticDataMember; +// CHECK: | | |-VarDecl {{.*}} StaticDataMember 'int' static internal-linkage + + void NonStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} NonStaticMemberFunction 'void ()' internal-linkage + + constexpr void ConstexprNonStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} constexpr ConstexprNonStaticMemberFunction 'void ()' implicit-inline internal-linkage + + consteval void ConstevalNonStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} consteval ConstevalNonStaticMemberFunction 'void ()' implicit-inline internal-linkage + + template + void NonStaticMemberFunctionTemplate(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} NonStaticMemberFunctionTemplate internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} NonStaticMemberFunctionTemplate 'void ()' + + template + constexpr void ConstexprNonStaticMemberFunction(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} ConstexprNonStaticMemberFunction internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} constexpr ConstexprNonStaticMemberFunction 'void ()' implicit-inline + + template + consteval void ConstevalNonStaticMemberFunction(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} ConstevalNonStaticMemberFunction internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} consteval ConstevalNonStaticMemberFunction 'void ()' implicit-inline + + static void StaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} StaticMemberFunction 'void ()' static internal-linkage + + constexpr static void ConstexprStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} constexpr ConstexprStaticMemberFunction 'void ()' static implicit-inline internal-linkage + + consteval static void ConstevalStaticMemberFunction(); +// CHECK: | | |-CXXMethodDecl {{.*}} consteval ConstevalStaticMemberFunction 'void ()' static implicit-inline internal-linkage + + template + static void StaticMemberFunctionTemplate(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} StaticMemberFunctionTemplate internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} StaticMemberFunctionTemplate 'void ()' static + + template + constexpr static void ConstexprStaticMemberFunctionTemplate(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} ConstexprStaticMemberFunctionTemplate internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} ConstexprStaticMemberFunctionTemplate 'void ()' static implicit-inline + + template + consteval static void ConstevalStaticMemberFunctionTemplate(); +// CHECK: | | |-FunctionTemplateDecl {{.*}} ConstevalStaticMemberFunctionTemplate internal-linkage +// CHECK: | | | `-CXXMethodDecl {{.*}} ConstevalStaticMemberFunctionTemplate 'void ()' static implicit-inline + + struct NestedStruct {}; +// CHECK: | | |-CXXRecordDecl {{.*}} struct NestedStruct definition internal-linkage +// CHECK: | | | `-CXXRecordDecl {{.*}} implicit struct NestedStruct + + template + struct NestedStructTemplate {}; +// CHECK: | | `-ClassTemplateDecl {{.*}} NestedStructTemplate internal-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} struct NestedStructTemplate definition +// CHECK: | | `-CXXRecordDecl {{.*}} implicit struct NestedStructTemplate +}; +} // namespace M + +namespace NamespaceAlias = N; +// CHECK: | `-NamespaceAliasDecl {{.*}} NamespaceAlias + +} // unnamed namespace diff --git a/clang/test/AST/ast-dump-linkage.cpp b/clang/test/AST/ast-dump-linkage.cpp new file mode 100644 index 0000000000000..98ff532be0f03 --- /dev/null +++ b/clang/test/AST/ast-dump-linkage.cpp @@ -0,0 +1,485 @@ +// RUN: %clang_cc1 -ast-dump -std=c++2c %s | FileCheck --match-full-lines %s + +namespace std { +template +struct initializer_list { + const T* begin; + const T* end; +}; +} // namespace std + +typedef int TypedefInt; +// CHECK: |-TypedefDecl {{.*}} TypedefInt 'int' + +using UsingInt = int; +// CHECK: |-TypeAliasDecl {{.*}} UsingInt 'int' + +template +using TemplateUsingInt = T; +// CHECK: |-TypeAliasTemplateDecl {{.*}} TemplateUsingInt external-linkage +// CHECK: | `-TypeAliasDecl {{.*}} TemplateUsingInt 'T' + +typedef struct {} TypedefUnnamedStruct; +// CHECK: |-TypedefDecl {{.*}} TypedefUnnamedStruct 'struct TypedefUnnamedStruct' external-linkage +// CHECK: | `-RecordType {{.*}} 'struct TypedefUnnamedStruct' owns_tag struct + +using UsingUnnamedStruct = struct {}; +// CHECK: |-TypeAliasDecl {{.*}} UsingUnnamedStruct 'struct UsingUnnamedStruct' external-linkage +// CHECK: | `-RecordType {{.*}} 'struct UsingUnnamedStruct' owns_tag struct + +typedef struct TypedefNamedStruct {} TypedefNameForNamedStruct; +// CHECK: |-CXXRecordDecl {{.*}} struct TypedefNamedStruct definition external-linkage +// CHECK: | `-CXXRecordDecl {{.*}} implicit struct TypedefNamedStruct +// CHECK: |-TypedefDecl {{.*}} TypedefNameForNamedStruct 'struct TypedefNamedStruct' +// CHECK: | `-RecordType {{.*}} 'struct TypedefNamedStruct' owns_tag struct +// CHECK: | `-CXXRecord {{.*}} 'TypedefNamedStruct' + +using AliasForNamedStruct = struct UsingNamedStruct {}; +// CHECK: |-CXXRecordDecl {{.*}} struct UsingNamedStruct definition external-linkage +// CHECK: | `-CXXRecordDecl {{.*}} implicit struct UsingNamedStruct +// CHECK: |-TypeAliasDecl {{.*}} AliasForNamedStruct 'struct UsingNamedStruct' +// CHECK: | `-RecordType {{.*}} 'struct UsingNamedStruct' owns_tag struct +// CHECK: | `-CXXRecord {{.*}} 'UsingNamedStruct' + +typedef enum {} TypedefUnnamedEnum; +// CHECK: |-TypedefDecl {{.*}} TypedefUnnamedEnum 'enum TypedefUnnamedEnum' external-linkage +// CHECK: | `-EnumType {{.*}} 'enum TypedefUnnamedEnum' owns_tag enum + +using UsingUnnamedEnum = enum {}; +// CHECK: |-TypeAliasDecl {{.*}} UsingUnnamedEnum 'enum UsingUnnamedEnum' external-linkage +// CHECK: | `-EnumType {{.*}} 'enum UsingUnnamedEnum' owns_tag enum + +enum Enum {}; +// CHECK: |-EnumDecl {{.*}} Enum external-linkage + +enum { Enumerator }; +// CHECK: |-EnumDecl {{.*}} +// CHECK: | `-EnumConstantDecl {{.*}} referenced Enumerator '(unnamed enum at {{.*}})' +// FIXME: This enum has enumerator as its name for linkage purposes, and has external linkage. + +decltype(Enumerator) f(); +// CHECK: |-FunctionDecl {{.*}} f 'decltype(Enumerator) ()' external-linkage + +auto [Binding1, Binding2] = {3, 4}; +// CHECK: |-BindingDecl {{.*}} Binding1 'const int *' +// CHECK: |-BindingDecl {{.*}} Binding2 'const int *' +// CHECK: |-DecompositionDecl {{.*}} used 'std::initializer_list' cinit external-linkage +// CHECK: | |-BindingDecl {{.*}} Binding1 'const int *' +// CHECK: | `-BindingDecl {{.*}} Binding2 'const int *' +// FIXME: Why BindingDecls are duplicated? + +int Int = 0; +// CHECK: |-VarDecl {{.*}} Int 'int' cinit external-linkage + +const int ConstInt = 0; +// CHECK: |-VarDecl {{.*}} ConstInt 'const int' cinit internal-linkage + +template +T TemplatedVar = T{}; +// CHECK: |-VarTemplateDecl {{.*}} TemplatedVar external-linkage +// CHECK: | |-VarDecl {{.*}} TemplatedVar 'T' cinit instantiated_from 0x{{[0-9a-f]*}} +// CHECK: | `-VarTemplateSpecializationDecl {{.*}} used TemplatedVar 'int' implicit_instantiation cinit instantiated_from 0x{{[0-9a-f]*}} external-linkage + +// FIXME: VarTemplateSpecializationDecl node is printed twice. + +int TemplatedVarSpec = TemplatedVar; +// CHECK: |-VarDecl {{.*}} TemplatedVarSpec 'int' cinit external-linkage +// CHECK: |-VarTemplateSpecializationDecl {{.*}} used TemplatedVar 'int' implicit_instantiation cinit instantiated_from 0x{{[0-9a-f]*}} external-linkage + +void FuncDef() { +// CHECK: |-FunctionDecl {{.*}} FuncDef 'void ()' external-linkage + + extern int Int; +// CHECK: | | `-VarDecl {{.*}} Int 'int' extern external-linkage + extern const int ConstInt; +// CHECK: | | `-VarDecl {{.*}} ConstInt 'const int' extern internal-linkage + void FuncDecl(); +// CHECK: | | `-FunctionDecl {{.*}} FuncDecl 'void ()' external-linkage + extern void FuncDecl(); +// CHECK: | | `-FunctionDecl {{.*}} FuncDecl 'void ()' extern external-linkage + { + int Int; +// CHECK: | | `-VarDecl {{.*}} Int 'int' + { + extern int Int; +// CHECK: | | `-VarDecl {{.*}} Int 'int' extern external-linkage + extern const int ConstInt; +// CHECK: | `-VarDecl {{.*}} ConstInt 'const int' extern internal-linkage + } + } +} + +template +void TemplatedFuncDef() {} +// CHECK: |-FunctionTemplateDecl {{.*}} TemplatedFuncDef external-linkage +// CHECK: | `-FunctionDecl {{.*}} TemplatedFuncDef 'void ()' + +namespace Known { + +void FuncDecl(); +// CHECK: | |-FunctionDecl {{.*}} FuncDecl 'void ()' external-linkage + +constexpr void ConstexprFuncDecl(); +// CHECK: | |-FunctionDecl{{.*}} constexpr ConstexprFuncDecl 'void ()' implicit-inline external-linkage + +consteval void ConstevalFuncDecl(); +// CHECK: | |-FunctionDecl{{.*}} consteval ConstevalFuncDecl 'void ()' implicit-inline external-linkage +// FIXME: Why consteval functions have linkage? + +template +void TemplatedFuncDecl(); +// CHECK: | |-FunctionTemplateDecl {{.*}} TemplatedFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} TemplatedFuncDecl 'void ()' + +template +constexpr void TemplatedConstexprFuncDecl(); +// CHECK: | |-FunctionTemplateDecl {{.*}} TemplatedConstexprFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} constexpr TemplatedConstexprFuncDecl 'void ()' implicit-inline + +template +consteval void TemplatedConstevalFuncDecl(); +// CHECK: | |-FunctionTemplateDecl {{.*}} TemplatedConstevalFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} consteval TemplatedConstevalFuncDecl 'void ()' implicit-inline +// FIXME: Should consteval function templates have linkage? + +struct FriendStruct; +// CHECK: | |-CXXRecordDecl {{.*}} struct FriendStruct external-linkage + +template +struct FriendStructTemplate; +// CHECK: | `-ClassTemplateDecl {{.*}} FriendStructTemplate external-linkage +// CHECK: | `-CXXRecordDecl {{.*}} struct FriendStructTemplate + +} // namespace Known + +namespace N { +// CHECK-LABEL: |-NamespaceDecl {{.*}} N external-linkage + +struct Struct { +// CHECK: | `-CXXRecordDecl {{.*}} struct Struct definition external-linkage +// CHECK: | |-CXXRecordDecl {{.*}} implicit struct Struct + + friend struct UnknownFriendStruct; +// CHECK: | |-FriendDecl {{.*}} 'struct UnknownFriendStruct' +// CHECK: | | `-CXXRecordDecl {{.*}} friend_undeclared struct UnknownFriendStruct external-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + template + friend struct UnknownFriendStructTemplate; +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-ClassTemplateDecl {{.*}} friend_undeclared UnknownFriendStructTemplate external-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} struct UnknownFriendStructTemplate +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + friend struct Known::FriendStruct; +// CHECK: | |-FriendDecl {{.*}} 'struct Known::FriendStruct' +// FIXME: Where is CXXRecordDecl? + + template + friend struct Known::FriendStructTemplate; +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-ClassTemplateDecl {{.*}} friend FriendStructTemplate external-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} struct FriendStructTemplate + + friend void UnknownFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} friend_undeclared UnknownFuncDecl 'void ()' external-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + friend constexpr void UnknownConstexprFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} constexpr friend_undeclared UnknownConstexprFuncDecl 'void ()' implicit-inline external-linkage + + friend consteval void UnknownConstevalFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} consteval friend_undeclared UnknownConstevalFuncDecl 'void ()' implicit-inline external-linkage + + template + friend void UnknownFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownFuncDecl external-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + template + friend constexpr void UnknownConstexprFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownConstexprFuncDecl external-linkage + + template + friend consteval void UnknownConstevalFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownConstevalFuncDecl external-linkage + + friend void Known::FuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} friend FuncDecl 'void ()' external-linkage + + friend constexpr void Known::ConstexprFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} constexpr friend ConstexprFuncDecl 'void ()' implicit-inline external-linkage + + friend consteval void Known::ConstevalFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} consteval friend ConstevalFuncDecl 'void ()' implicit-inline external-linkage + + template + friend void Known::TemplatedFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend TemplatedFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} friend TemplatedFuncDecl 'void ()' + + template + friend constexpr void Known::TemplatedConstexprFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend TemplatedConstexprFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} constexpr friend TemplatedConstexprFuncDecl 'void ()' implicit-inline + + template + friend consteval void Known::TemplatedConstevalFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend TemplatedConstevalFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} consteval friend TemplatedConstevalFuncDecl 'void ()' implicit-inline + + friend void HiddenFriend() {} +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} friend_undeclared HiddenFriend 'void ()' implicit-inline external-linkage + + template + friend void HiddenFriendTemplate() {} +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend_undeclared HiddenFriendTemplate external-linkage +// CHECK: | | `-FunctionDecl {{.*}} friend_undeclared HiddenFriendTemplate 'void ()' implicit-inline + + int NonStaticDataMember; +// CHECK: | |-FieldDecl {{.*}} NonStaticDataMember 'int' + + static int StaticDataMember; +// CHECK: | |-VarDecl {{.*}} StaticDataMember 'int' static external-linkage + + void NonStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} NonStaticMemberFunction 'void ()' external-linkage + + constexpr void ConstexprNonStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} constexpr ConstexprNonStaticMemberFunction 'void ()' implicit-inline external-linkage + + consteval void ConstevalNonStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} consteval ConstevalNonStaticMemberFunction 'void ()' implicit-inline external-linkage + + template + void NonStaticMemberFunctionTemplate(); +// CHECK: | |-FunctionTemplateDecl {{.*}} NonStaticMemberFunctionTemplate external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} NonStaticMemberFunctionTemplate 'void ()' + + template + constexpr void ConstexprNonStaticMemberFunction(); +// CHECK: | |-FunctionTemplateDecl {{.*}} ConstexprNonStaticMemberFunction external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} constexpr ConstexprNonStaticMemberFunction 'void ()' implicit-inline + + template + consteval void ConstevalNonStaticMemberFunction(); +// CHECK: | |-FunctionTemplateDecl {{.*}} ConstevalNonStaticMemberFunction external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} consteval ConstevalNonStaticMemberFunction 'void ()' implicit-inline + + static void StaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} StaticMemberFunction 'void ()' static external-linkage + + constexpr static void ConstexprStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} constexpr ConstexprStaticMemberFunction 'void ()' static implicit-inline external-linkage + + consteval static void ConstevalStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} consteval ConstevalStaticMemberFunction 'void ()' static implicit-inline external-linkage + + template + static void StaticMemberFunctionTemplate(); +// CHECK: | |-FunctionTemplateDecl {{.*}} StaticMemberFunctionTemplate external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} StaticMemberFunctionTemplate 'void ()' static + + template + constexpr static void ConstexprStaticMemberFunctionTemplate(); +// CHECK: | |-FunctionTemplateDecl {{.*}} ConstexprStaticMemberFunctionTemplate external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} ConstexprStaticMemberFunctionTemplate 'void ()' static implicit-inline + + template + consteval static void ConstevalStaticMemberFunctionTemplate(); +// CHECK: | |-FunctionTemplateDecl {{.*}} ConstevalStaticMemberFunctionTemplate external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} ConstevalStaticMemberFunctionTemplate 'void ()' static implicit-inline + + struct NestedStruct {}; +// CHECK: | |-CXXRecordDecl {{.*}} struct NestedStruct definition external-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} implicit struct NestedStruct + + template + struct NestedStructTemplate {}; +// CHECK: | `-ClassTemplateDecl {{.*}} NestedStructTemplate external-linkage +// CHECK: | `-CXXRecordDecl {{.*}} struct NestedStructTemplate definition +// CHECK: | `-CXXRecordDecl {{.*}} implicit struct NestedStructTemplate +}; +} // namespace N + +namespace M { +// CHECK-LABEL: |-NamespaceDecl {{.*}} M external-linkage + +template +struct StructTemplate { +// CHECK: | `-ClassTemplateDecl {{.*}} StructTemplate external-linkage +// CHECK: | `-CXXRecordDecl {{.*}} struct StructTemplate definition +// CHECK: | |-CXXRecordDecl {{.*}} implicit struct StructTemplate + + friend struct UnknownFriendStruct; +// CHECK: | |-FriendDecl {{.*}} 'struct UnknownFriendStruct' +// CHECK: | | `-CXXRecordDecl {{.*}} friend_undeclared struct UnknownFriendStruct external-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + template + friend struct UnknownFriendStructTemplate; +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-ClassTemplateDecl {{.*}} friend_undeclared UnknownFriendStructTemplate external-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} struct UnknownFriendStructTemplate +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + friend struct Known::FriendStruct; +// CHECK: | |-FriendDecl {{.*}} 'struct Known::FriendStruct' + + template + friend struct Known::FriendStructTemplate; +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-ClassTemplateDecl {{.*}} friend_undeclared FriendStructTemplate external-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} struct FriendStructTemplate + + friend void UnknownFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} friend_undeclared UnknownFuncDecl 'void ()' external-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + friend constexpr void UnknownConstexprFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} constexpr friend_undeclared UnknownConstexprFuncDecl 'void ()' implicit-inline external-linkage + + friend consteval void UnknownConstevalFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} consteval friend_undeclared UnknownConstevalFuncDecl 'void ()' implicit-inline external-linkage + + template + friend void UnknownFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownFuncDecl external-linkage +// FIXME: Friend declarations do not bind names, so they cannot have linkage. + + template + friend constexpr void UnknownConstexprFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownConstexprFuncDecl external-linkage + + template + friend consteval void UnknownConstevalFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend_undeclared UnknownConstevalFuncDecl external-linkage + + friend void Known::FuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} friend_undeclared FuncDecl 'void ()' external-linkage + + friend constexpr void Known::ConstexprFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} constexpr friend_undeclared ConstexprFuncDecl 'void ()' implicit-inline external-linkage + + friend consteval void Known::ConstevalFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} consteval friend_undeclared ConstevalFuncDecl 'void ()' implicit-inline external-linkage + + template + friend void Known::TemplatedFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend TemplatedFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} friend TemplatedFuncDecl 'void ()' + + template + friend constexpr void Known::TemplatedConstexprFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend TemplatedConstexprFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} constexpr friend TemplatedConstexprFuncDecl 'void ()' implicit-inline + + template + friend consteval void Known::TemplatedConstevalFuncDecl(); +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend TemplatedConstevalFuncDecl external-linkage +// CHECK: | | `-FunctionDecl {{.*}} consteval friend TemplatedConstevalFuncDecl 'void ()' implicit-inline + + friend void HiddenFriend() {} +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionDecl {{.*}} friend_undeclared HiddenFriend 'void ()' implicit-inline external-linkage + + template + friend void HiddenFriendTemplate() {} +// CHECK: | |-FriendDecl {{.*}} col:{{[0-9]*$}} +// CHECK: | | `-FunctionTemplateDecl {{.*}} friend_undeclared HiddenFriendTemplate external-linkage +// CHECK: | | `-FunctionDecl {{.*}} friend_undeclared HiddenFriendTemplate 'void ()' implicit-inline + + int NonStaticDataMember; +// CHECK: | |-FieldDecl {{.*}} NonStaticDataMember 'int' + + static int StaticDataMember; +// CHECK: | |-VarDecl {{.*}} StaticDataMember 'int' static external-linkage + + void NonStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} NonStaticMemberFunction 'void ()' external-linkage + + constexpr void ConstexprNonStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} constexpr ConstexprNonStaticMemberFunction 'void ()' implicit-inline external-linkage + + consteval void ConstevalNonStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} consteval ConstevalNonStaticMemberFunction 'void ()' implicit-inline external-linkage + + template + void NonStaticMemberFunctionTemplate(); +// CHECK: | |-FunctionTemplateDecl {{.*}} NonStaticMemberFunctionTemplate external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} NonStaticMemberFunctionTemplate 'void ()' + + template + constexpr void ConstexprNonStaticMemberFunction(); +// CHECK: | |-FunctionTemplateDecl {{.*}} ConstexprNonStaticMemberFunction external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} constexpr ConstexprNonStaticMemberFunction 'void ()' implicit-inline + + template + consteval void ConstevalNonStaticMemberFunction(); +// CHECK: | |-FunctionTemplateDecl {{.*}} ConstevalNonStaticMemberFunction external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} consteval ConstevalNonStaticMemberFunction 'void ()' implicit-inline + + static void StaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} StaticMemberFunction 'void ()' static external-linkage + + constexpr static void ConstexprStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} constexpr ConstexprStaticMemberFunction 'void ()' static implicit-inline external-linkage + + consteval static void ConstevalStaticMemberFunction(); +// CHECK: | |-CXXMethodDecl {{.*}} consteval ConstevalStaticMemberFunction 'void ()' static implicit-inline external-linkage + + template + static void StaticMemberFunctionTemplate(); +// CHECK: | |-FunctionTemplateDecl {{.*}} StaticMemberFunctionTemplate external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} StaticMemberFunctionTemplate 'void ()' static + + template + constexpr static void ConstexprStaticMemberFunctionTemplate(); +// CHECK: | |-FunctionTemplateDecl {{.*}} ConstexprStaticMemberFunctionTemplate external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} ConstexprStaticMemberFunctionTemplate 'void ()' static implicit-inline + + template + consteval static void ConstevalStaticMemberFunctionTemplate(); +// CHECK: | |-FunctionTemplateDecl {{.*}} ConstevalStaticMemberFunctionTemplate external-linkage +// CHECK: | | `-CXXMethodDecl {{.*}} ConstevalStaticMemberFunctionTemplate 'void ()' static implicit-inline + + struct NestedStruct {}; +// CHECK: | |-CXXRecordDecl {{.*}} struct NestedStruct definition external-linkage +// CHECK: | | `-CXXRecordDecl {{.*}} implicit struct NestedStruct + + template + struct NestedStructTemplate {}; +// CHECK: | `-ClassTemplateDecl {{.*}} NestedStructTemplate external-linkage +// CHECK: | `-CXXRecordDecl {{.*}} struct NestedStructTemplate definition +// CHECK: | `-CXXRecordDecl {{.*}} implicit struct NestedStructTemplate +}; +} // namespace M + +namespace NamespaceAlias = N; +// CHECK: `-NamespaceAliasDecl {{.*}} NamespaceAlias diff --git a/clang/test/AST/ast-dump-openmp-atomic.c b/clang/test/AST/ast-dump-openmp-atomic.c index 2bd9f558b749a..7a54a43a32dc0 100644 --- a/clang/test/AST/ast-dump-openmp-atomic.c +++ b/clang/test/AST/ast-dump-openmp-atomic.c @@ -6,7 +6,7 @@ void test(int i) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-atomic.c:3:1, line:6:1> line:3:6 test 'void (int)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-atomic.c:3:1, line:6:1> line:3:6 test 'void (int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:15 used i 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPAtomicDirective {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-barrier.c b/clang/test/AST/ast-dump-openmp-barrier.c index a0b8bd2fd3bf0..94312c5eae2be 100644 --- a/clang/test/AST/ast-dump-openmp-barrier.c +++ b/clang/test/AST/ast-dump-openmp-barrier.c @@ -5,6 +5,6 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-barrier.c:3:1, line:5:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-barrier.c:3:1, line:5:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPBarrierDirective {{.*}} openmp_standalone_directive diff --git a/clang/test/AST/ast-dump-openmp-cancel.c b/clang/test/AST/ast-dump-openmp-cancel.c index ce695b1507921..817ea149d8f5a 100644 --- a/clang/test/AST/ast-dump-openmp-cancel.c +++ b/clang/test/AST/ast-dump-openmp-cancel.c @@ -8,7 +8,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-cancel.c:3:1, line:8:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-cancel.c:3:1, line:8:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPParallelDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-cancellation-point.c b/clang/test/AST/ast-dump-openmp-cancellation-point.c index 62cd236950805..d793ed929c872 100644 --- a/clang/test/AST/ast-dump-openmp-cancellation-point.c +++ b/clang/test/AST/ast-dump-openmp-cancellation-point.c @@ -8,7 +8,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-cancellation-point.c:3:1, line:8:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-cancellation-point.c:3:1, line:8:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPParallelDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-critical.c b/clang/test/AST/ast-dump-openmp-critical.c index 7b2ff15677646..acf762072a5b1 100644 --- a/clang/test/AST/ast-dump-openmp-critical.c +++ b/clang/test/AST/ast-dump-openmp-critical.c @@ -6,7 +6,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-critical.c:3:1, line:6:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-critical.c:3:1, line:6:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPCriticalDirective {{.*}} // CHECK-NEXT: `-NullStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c index 672607fa90670..e9318fc8bbaef 100644 --- a/clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPDistributeParallelForSimdDirective {{.*}} @@ -63,7 +63,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -106,7 +106,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -153,7 +153,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -200,7 +200,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-distribute-parallel-for.c b/clang/test/AST/ast-dump-openmp-distribute-parallel-for.c index 8eedf8ac8bc58..9392bdfd1f217 100644 --- a/clang/test/AST/ast-dump-openmp-distribute-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-distribute-parallel-for.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPDistributeParallelForDirective {{.*}} @@ -63,7 +63,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -106,7 +106,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -153,7 +153,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -200,7 +200,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-distribute-simd.c b/clang/test/AST/ast-dump-openmp-distribute-simd.c index b5ad177249efb..7e61b02b03cb8 100644 --- a/clang/test/AST/ast-dump-openmp-distribute-simd.c +++ b/clang/test/AST/ast-dump-openmp-distribute-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPDistributeSimdDirective {{.*}} @@ -59,7 +59,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -98,7 +98,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -141,7 +141,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -184,7 +184,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-distribute.c b/clang/test/AST/ast-dump-openmp-distribute.c index 1867308524d5c..a5d89b49324f4 100644 --- a/clang/test/AST/ast-dump-openmp-distribute.c +++ b/clang/test/AST/ast-dump-openmp-distribute.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-distribute.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPDistributeDirective {{.*}} @@ -59,7 +59,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -98,7 +98,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -141,7 +141,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -184,7 +184,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-flush.c b/clang/test/AST/ast-dump-openmp-flush.c index 929f5983fb64b..408c46f4faaa2 100644 --- a/clang/test/AST/ast-dump-openmp-flush.c +++ b/clang/test/AST/ast-dump-openmp-flush.c @@ -5,6 +5,6 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-flush.c:3:1, line:5:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-flush.c:3:1, line:5:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPFlushDirective {{.*}} openmp_standalone_directive diff --git a/clang/test/AST/ast-dump-openmp-for-simd.c b/clang/test/AST/ast-dump-openmp-for-simd.c index 06ae226ccb17d..b72359c842fad 100644 --- a/clang/test/AST/ast-dump-openmp-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-for-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPForSimdDirective {{.*}} @@ -59,7 +59,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -98,7 +98,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -141,7 +141,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -184,7 +184,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-for.c b/clang/test/AST/ast-dump-openmp-for.c index 65bd72df63488..f8be9f3e7505d 100644 --- a/clang/test/AST/ast-dump-openmp-for.c +++ b/clang/test/AST/ast-dump-openmp-for.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPForDirective {{.*}} @@ -59,7 +59,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -98,7 +98,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -141,7 +141,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -184,7 +184,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-master.c b/clang/test/AST/ast-dump-openmp-master.c index 80a2c79a4b401..87a7e28592ced 100644 --- a/clang/test/AST/ast-dump-openmp-master.c +++ b/clang/test/AST/ast-dump-openmp-master.c @@ -6,7 +6,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-master.c:3:1, line:6:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-master.c:3:1, line:6:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPMasterDirective {{.*}} // CHECK-NEXT: `-NullStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-ordered.c b/clang/test/AST/ast-dump-openmp-ordered.c index 0bbbfdc2f85b0..97dbe3fe0d0e1 100644 --- a/clang/test/AST/ast-dump-openmp-ordered.c +++ b/clang/test/AST/ast-dump-openmp-ordered.c @@ -19,14 +19,14 @@ void test_three(int x) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-ordered.c:3:1, line:6:1> line:3:6 test_one 'void (void)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-ordered.c:3:1, line:6:1> line:3:6 test_one 'void (void)' external-linkage // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPOrderedDirective {{.*}} // CHECK-NEXT: | `-CapturedStmt {{.*}} // CHECK-NEXT: | `-CapturedDecl {{.*}} <> // CHECK-NEXT: | |-NullStmt {{.*}} // CHECK-NEXT: | `-ImplicitParamDecl {{.*}} col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-ordered.c:4:1) *const restrict' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:8:6 test_two 'void (int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:8:6 test_two 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPForDirective {{.*}} @@ -51,7 +51,7 @@ void test_three(int x) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:14:6 test_three 'void (int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:14:6 test_three 'void (int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPForDirective {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-parallel-for-simd.c index 6ef09fe88ab3d..6cad2d93a3874 100644 --- a/clang/test/AST/ast-dump-openmp-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-parallel-for-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPParallelForSimdDirective {{.*}} @@ -61,7 +61,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -102,7 +102,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -147,7 +147,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -192,7 +192,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-parallel-for.c b/clang/test/AST/ast-dump-openmp-parallel-for.c index 647b4480de539..7b0294cc44f1b 100644 --- a/clang/test/AST/ast-dump-openmp-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-parallel-for.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPParallelForDirective {{.*}} @@ -61,7 +61,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -102,7 +102,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -147,7 +147,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -192,7 +192,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-parallel-sections.c b/clang/test/AST/ast-dump-openmp-parallel-sections.c index b7706c1c58c65..cec573c6713af 100644 --- a/clang/test/AST/ast-dump-openmp-parallel-sections.c +++ b/clang/test/AST/ast-dump-openmp-parallel-sections.c @@ -11,9 +11,9 @@ void test_one(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel-sections.c:3:1, line:6:1> line:3:6 test_zero 'void (void)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel-sections.c:3:1, line:6:1> line:3:6 test_zero 'void (void)' external-linkage // CHECK-NEXT: | `-CompoundStmt {{.*}} -// CHECK-NEXT: `-FunctionDecl {{.*}} line:8:6 test_one 'void (void)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:8:6 test_one 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPParallelSectionsDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-parallel.c b/clang/test/AST/ast-dump-openmp-parallel.c index 9bcd4eb06b4fd..12d88752fa9cb 100644 --- a/clang/test/AST/ast-dump-openmp-parallel.c +++ b/clang/test/AST/ast-dump-openmp-parallel.c @@ -6,7 +6,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel.c:3:1, line:6:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-parallel.c:3:1, line:6:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPParallelDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-section.c b/clang/test/AST/ast-dump-openmp-section.c index 702bad7aa02d6..39a16d00fc1c7 100644 --- a/clang/test/AST/ast-dump-openmp-section.c +++ b/clang/test/AST/ast-dump-openmp-section.c @@ -9,7 +9,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-section.c:3:1, line:9:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-section.c:3:1, line:9:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPSectionsDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-sections.c b/clang/test/AST/ast-dump-openmp-sections.c index 374325423ecdb..1172606f01d62 100644 --- a/clang/test/AST/ast-dump-openmp-sections.c +++ b/clang/test/AST/ast-dump-openmp-sections.c @@ -11,9 +11,9 @@ void test_one(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-sections.c:3:1, line:6:1> line:3:6 test_zero 'void (void)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-sections.c:3:1, line:6:1> line:3:6 test_zero 'void (void)' external-linkage // CHECK-NEXT: | `-CompoundStmt {{.*}} -// CHECK-NEXT: `-FunctionDecl {{.*}} line:8:6 test_one 'void (void)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:8:6 test_one 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPSectionsDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-simd.c b/clang/test/AST/ast-dump-openmp-simd.c index cffbb9065f1d6..5ba5df7588314 100644 --- a/clang/test/AST/ast-dump-openmp-simd.c +++ b/clang/test/AST/ast-dump-openmp-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPSimdDirective {{.*}} @@ -59,7 +59,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -98,7 +98,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -141,7 +141,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -184,7 +184,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-single.c b/clang/test/AST/ast-dump-openmp-single.c index 2735c5d061008..df96bcd30eaed 100644 --- a/clang/test/AST/ast-dump-openmp-single.c +++ b/clang/test/AST/ast-dump-openmp-single.c @@ -6,7 +6,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-single.c:3:1, line:6:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-single.c:3:1, line:6:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPSingleDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-target-data.c b/clang/test/AST/ast-dump-openmp-target-data.c index 0abf6f4ca2dfb..4b5d0638cfd12 100644 --- a/clang/test/AST/ast-dump-openmp-target-data.c +++ b/clang/test/AST/ast-dump-openmp-target-data.c @@ -6,7 +6,7 @@ void test(int x) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-data.c:3:1, line:6:1> line:3:6 test 'void (int)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-data.c:3:1, line:6:1> line:3:6 test 'void (int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:15 used x 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTargetDataDirective {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-target-enter-data.c b/clang/test/AST/ast-dump-openmp-target-enter-data.c index fa516f1adb773..cfb15c532cbd2 100644 --- a/clang/test/AST/ast-dump-openmp-target-enter-data.c +++ b/clang/test/AST/ast-dump-openmp-target-enter-data.c @@ -6,7 +6,7 @@ void test(int x) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-enter-data.c:3:1, line:6:1> line:3:6 test 'void (int)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-enter-data.c:3:1, line:6:1> line:3:6 test 'void (int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:15 used x 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTargetEnterDataDirective {{.*}} openmp_standalone_directive diff --git a/clang/test/AST/ast-dump-openmp-target-exit-data.c b/clang/test/AST/ast-dump-openmp-target-exit-data.c index 255abe66dcf3c..8fd54edbc57b0 100644 --- a/clang/test/AST/ast-dump-openmp-target-exit-data.c +++ b/clang/test/AST/ast-dump-openmp-target-exit-data.c @@ -6,7 +6,7 @@ void test(int x) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-exit-data.c:3:1, line:6:1> line:3:6 test 'void (int)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-exit-data.c:3:1, line:6:1> line:3:6 test 'void (int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:15 used x 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTargetExitDataDirective {{.*}} openmp_standalone_directive diff --git a/clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c index e483f215d2577..a3cbf8762b201 100644 --- a/clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-target-parallel-for-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetParallelForSimdDirective {{.*}} @@ -152,7 +152,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -336,7 +336,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -524,7 +524,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -712,7 +712,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-parallel-for.c b/clang/test/AST/ast-dump-openmp-target-parallel-for.c index 0d9d2ec93227a..3c9d3a145a6d9 100644 --- a/clang/test/AST/ast-dump-openmp-target-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-target-parallel-for.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetParallelForDirective {{.*}} @@ -152,7 +152,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -336,7 +336,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -524,7 +524,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -712,7 +712,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-parallel.c b/clang/test/AST/ast-dump-openmp-target-parallel.c index 5ceb55f4577e6..7ea4b1f4c5800 100644 --- a/clang/test/AST/ast-dump-openmp-target-parallel.c +++ b/clang/test/AST/ast-dump-openmp-target-parallel.c @@ -6,7 +6,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-parallel.c:3:1, line:6:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-parallel.c:3:1, line:6:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTargetParallelDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-target-simd.c b/clang/test/AST/ast-dump-openmp-target-simd.c index 7c90f6469f838..be8b7121e239a 100644 --- a/clang/test/AST/ast-dump-openmp-target-simd.c +++ b/clang/test/AST/ast-dump-openmp-target-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetSimdDirective {{.*}} @@ -94,7 +94,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -186,7 +186,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -282,7 +282,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -378,7 +378,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c index fee147a7e23c8..41a8779c43908 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams-distribute-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams-distribute-parallel-for-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetTeamsDistributeParallelForSimdDirective {{.*}} @@ -284,7 +284,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -668,7 +668,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -1056,7 +1056,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -1444,7 +1444,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c b/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c index 3d3f834c3525c..c5df392fb0451 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams-distribute-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams-distribute-parallel-for.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetTeamsDistributeParallelForDirective {{.*}} @@ -284,7 +284,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -668,7 +668,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -1056,7 +1056,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -1444,7 +1444,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c b/clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c index 95b051baafbb2..fc4d45677f21d 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c +++ b/clang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams-distribute-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams-distribute-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetTeamsDistributeSimdDirective {{.*}} @@ -152,7 +152,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -336,7 +336,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -524,7 +524,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -712,7 +712,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams-distribute.c b/clang/test/AST/ast-dump-openmp-target-teams-distribute.c index 5957caabf1632..1bc8481c64355 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams-distribute.c +++ b/clang/test/AST/ast-dump-openmp-target-teams-distribute.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams-distribute.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams-distribute.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetTeamsDistributeDirective {{.*}} @@ -152,7 +152,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -336,7 +336,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -524,7 +524,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -712,7 +712,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-target-teams.c b/clang/test/AST/ast-dump-openmp-target-teams.c index 85d334a68b1d8..dadb2b2d884ad 100644 --- a/clang/test/AST/ast-dump-openmp-target-teams.c +++ b/clang/test/AST/ast-dump-openmp-target-teams.c @@ -6,7 +6,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams.c:3:1, line:6:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-teams.c:3:1, line:6:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTargetTeamsDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-target-update.c b/clang/test/AST/ast-dump-openmp-target-update.c index 629c62a317a57..eb3e575c23c99 100644 --- a/clang/test/AST/ast-dump-openmp-target-update.c +++ b/clang/test/AST/ast-dump-openmp-target-update.c @@ -5,7 +5,7 @@ void test(int x) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-update.c:3:1, line:5:1> line:3:6 test 'void (int)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target-update.c:3:1, line:5:1> line:3:6 test 'void (int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:15 used x 'int' // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTargetUpdateDirective {{.*}} openmp_standalone_directive diff --git a/clang/test/AST/ast-dump-openmp-target.c b/clang/test/AST/ast-dump-openmp-target.c index 24dd0d1eccc3e..157669e74eb16 100644 --- a/clang/test/AST/ast-dump-openmp-target.c +++ b/clang/test/AST/ast-dump-openmp-target.c @@ -6,7 +6,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target.c:3:1, line:6:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-target.c:3:1, line:6:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTargetDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-task.c b/clang/test/AST/ast-dump-openmp-task.c index 1945c3cfd3761..95e872bfe085d 100644 --- a/clang/test/AST/ast-dump-openmp-task.c +++ b/clang/test/AST/ast-dump-openmp-task.c @@ -8,7 +8,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} line:4:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} line:4:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK: `-OMPTaskDirective {{.*}} // CHECK-NEXT: |-OMPDetachClause {{.+}} diff --git a/clang/test/AST/ast-dump-openmp-taskgroup.c b/clang/test/AST/ast-dump-openmp-taskgroup.c index 461d07adcfb49..6ef15354b9808 100644 --- a/clang/test/AST/ast-dump-openmp-taskgroup.c +++ b/clang/test/AST/ast-dump-openmp-taskgroup.c @@ -6,7 +6,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskgroup.c:3:1, line:6:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskgroup.c:3:1, line:6:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTaskgroupDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-openmp-taskloop-simd.c b/clang/test/AST/ast-dump-openmp-taskloop-simd.c index de70ecdefd16a..63c3e0beadaff 100644 --- a/clang/test/AST/ast-dump-openmp-taskloop-simd.c +++ b/clang/test/AST/ast-dump-openmp-taskloop-simd.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskloop-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskloop-simd.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTaskLoopSimdDirective {{.*}} @@ -71,7 +71,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-taskloop-simd.c:4:1) *const restrict' // CHECK-NEXT: | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -122,7 +122,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-VarDecl {{.*}} col:14 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -177,7 +177,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-VarDecl {{.*}} col:14 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -232,7 +232,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-VarDecl {{.*}} col:14 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-taskloop.c b/clang/test/AST/ast-dump-openmp-taskloop.c index d6a9e2df149fc..2cf06f42cbd9c 100644 --- a/clang/test/AST/ast-dump-openmp-taskloop.c +++ b/clang/test/AST/ast-dump-openmp-taskloop.c @@ -36,7 +36,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskloop.c:3:1, line:7:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskloop.c:3:1, line:7:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTaskLoopDirective {{.*}} @@ -71,7 +71,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | |-ImplicitParamDecl {{.*}} col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-taskloop.c:4:1) *const restrict' // CHECK-NEXT: | `-VarDecl {{.*}} col:12 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 -// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:9:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -122,7 +122,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-VarDecl {{.*}} col:14 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 -// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:16:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -177,7 +177,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-VarDecl {{.*}} col:14 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 -// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:23:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -232,7 +232,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} 'int' 0 // CHECK-NEXT: | `-VarDecl {{.*}} col:14 used i 'int' cinit // CHECK-NEXT: | `-IntegerLiteral {{.*}} 'int' 0 -// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:30:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-taskwait.c b/clang/test/AST/ast-dump-openmp-taskwait.c index d20d4201c677d..920a97e39d409 100644 --- a/clang/test/AST/ast-dump-openmp-taskwait.c +++ b/clang/test/AST/ast-dump-openmp-taskwait.c @@ -5,6 +5,6 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskwait.c:3:1, line:5:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskwait.c:3:1, line:5:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTaskwaitDirective {{.*}} openmp_standalone_directive diff --git a/clang/test/AST/ast-dump-openmp-taskyield.c b/clang/test/AST/ast-dump-openmp-taskyield.c index 402542c767846..8cd436ebe47bd 100644 --- a/clang/test/AST/ast-dump-openmp-taskyield.c +++ b/clang/test/AST/ast-dump-openmp-taskyield.c @@ -5,6 +5,6 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskyield.c:3:1, line:5:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskyield.c:3:1, line:5:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTaskyieldDirective {{.*}} openmp_standalone_directive diff --git a/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c b/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c index 89c55e839ca08..802bb86c1a700 100644 --- a/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c +++ b/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c @@ -41,7 +41,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute-parallel-for-simd.c:3:1, line:8:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute-parallel-for-simd.c:3:1, line:8:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetDirective {{.*}} @@ -321,7 +321,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:10:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:10:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -731,7 +731,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:18:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:18:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -1149,7 +1149,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:26:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:26:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -1605,7 +1605,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:34:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:34:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c b/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c index 7846eecdad6cd..46381d1184d19 100644 --- a/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c +++ b/clang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c @@ -41,7 +41,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:3:1, line:8:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute-parallel-for.c:3:1, line:8:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetDirective {{.*}} @@ -321,7 +321,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:10:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:10:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -731,7 +731,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:18:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:18:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -1149,7 +1149,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:26:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:26:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -1605,7 +1605,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:34:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:34:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-teams-distribute-simd.c b/clang/test/AST/ast-dump-openmp-teams-distribute-simd.c index ccf8821916038..f996f3e935449 100644 --- a/clang/test/AST/ast-dump-openmp-teams-distribute-simd.c +++ b/clang/test/AST/ast-dump-openmp-teams-distribute-simd.c @@ -41,7 +41,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute-simd.c:3:1, line:8:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute-simd.c:3:1, line:8:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetDirective {{.*}} @@ -193,7 +193,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:10:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:10:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -411,7 +411,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:18:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:18:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -637,7 +637,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:26:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:26:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -901,7 +901,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:34:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:34:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-teams-distribute.c b/clang/test/AST/ast-dump-openmp-teams-distribute.c index e2eaa1b4f78b0..8ccea811ccc91 100644 --- a/clang/test/AST/ast-dump-openmp-teams-distribute.c +++ b/clang/test/AST/ast-dump-openmp-teams-distribute.c @@ -41,7 +41,7 @@ void test_five(int x, int y, int z) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute.c:3:1, line:8:1> line:3:6 test_one 'void (int)' +// CHECK: |-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams-distribute.c:3:1, line:8:1> line:3:6 test_one 'void (int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} // CHECK-NEXT: | `-OMPTargetDirective {{.*}} @@ -193,7 +193,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | | `-IntegerLiteral {{.*}} 'int' 1 // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:10:6 test_two 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:10:6 test_two 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:19 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:26 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -411,7 +411,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:18:6 test_three 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:18:6 test_three 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:21 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:28 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -637,7 +637,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: |-FunctionDecl {{.*}} line:26:6 test_four 'void (int, int)' +// CHECK-NEXT: |-FunctionDecl {{.*}} line:26:6 test_four 'void (int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: | `-CompoundStmt {{.*}} @@ -901,7 +901,7 @@ void test_five(int x, int y, int z) { // CHECK-NEXT: | | `-IntegerLiteral {{.*}} <> 'int' 1 // CHECK-NEXT: | |-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int' // CHECK-NEXT: | `-DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'y' 'int' -// CHECK-NEXT: `-FunctionDecl {{.*}} line:34:6 test_five 'void (int, int, int)' +// CHECK-NEXT: `-FunctionDecl {{.*}} line:34:6 test_five 'void (int, int, int)' external-linkage // CHECK-NEXT: |-ParmVarDecl {{.*}} col:20 used x 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:27 used y 'int' // CHECK-NEXT: |-ParmVarDecl {{.*}} col:34 used z 'int' diff --git a/clang/test/AST/ast-dump-openmp-teams.c b/clang/test/AST/ast-dump-openmp-teams.c index bfc48f777513c..a76ace98be02d 100644 --- a/clang/test/AST/ast-dump-openmp-teams.c +++ b/clang/test/AST/ast-dump-openmp-teams.c @@ -7,7 +7,7 @@ void test(void) { } // CHECK: TranslationUnitDecl {{.*}} <> -// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams.c:3:1, line:7:1> line:3:6 test 'void (void)' +// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-teams.c:3:1, line:7:1> line:3:6 test 'void (void)' external-linkage // CHECK-NEXT: `-CompoundStmt {{.*}} // CHECK-NEXT: `-OMPTargetDirective {{.*}} // CHECK-NEXT: `-CapturedStmt {{.*}} diff --git a/clang/test/AST/ast-dump-template-name.cpp b/clang/test/AST/ast-dump-template-name.cpp index 7f085086ab6a3..b0a99cf27a932 100644 --- a/clang/test/AST/ast-dump-template-name.cpp +++ b/clang/test/AST/ast-dump-template-name.cpp @@ -13,10 +13,10 @@ namespace qualified { // CHECK-NEXT: TypeAliasDecl // CHECK-NEXT: `-TemplateSpecializationType // CHECK-NEXT: |-name: 'N' qualified -// CHECK-NEXT: | `-TypeAliasTemplateDecl {{.+}} N{{$}} +// CHECK-NEXT: | `-TypeAliasTemplateDecl {{.+}} N external-linkage{{$}} // CHECK-NEXT: |-TemplateArgument template 'foo::A':'qualified::foo::A' qualified{{$}} // CHECK-NEXT: | |-NestedNameSpecifier Namespace 0x{{.+}} 'foo'{{$}} -// CHECK-NEXT: | `-ClassTemplateDecl {{.+}} A{{$}} +// CHECK-NEXT: | `-ClassTemplateDecl {{.+}} A external-linkage{{$}} namespace dependent { template struct B { @@ -54,4 +54,4 @@ namespace subst { // CHECK-NEXT: | |-parameter: TemplateTemplateParmDecl {{.+}} depth 0 index 0 TT{{$}} // CHECK-NEXT: | |-associated ClassTemplateSpecialization {{.+}} 'B'{{$}} // CHECK-NEXT: | `-replacement: -// CHECK-NEXT: | `-ClassTemplateDecl {{.+}} A{{$}} +// CHECK-NEXT: | `-ClassTemplateDecl {{.+}} A external-linkage{{$}} diff --git a/clang/test/AST/ast-dump-templates-pattern.cpp b/clang/test/AST/ast-dump-templates-pattern.cpp index aaf8007c858f1..6938f650cc50b 100644 --- a/clang/test/AST/ast-dump-templates-pattern.cpp +++ b/clang/test/AST/ast-dump-templates-pattern.cpp @@ -12,13 +12,13 @@ namespace TestClassRedecl { template struct A; template struct A; // CHECK-LABEL: Dumping TestClassRedecl: -// CHECK: |-ClassTemplateDecl {{.+}} void f(); template void f(); // CHECK-LABEL: Dumping TestFunctionRedecl: -// CHECK: |-FunctionTemplateDecl 0x[[TestFunctionRedecl_T1:[^ ]+]] extern T a; template int a; // CHECK-LABEL: Dumping TestVariableRedecl: -// CHECK: |-VarTemplateDecl 0x[[TestVariableRedecl_T1:[^ ]+]] template struct A::B {}; template struct A::B; // CHECK-LABEL: Dumping TestNestedClassRedecl: -// CHECK: |-ClassTemplateDecl 0x[[TestNestedClassRedecl_A_T1:[^ ]+]] line:[[@LINE-8]]:{{.+}} struct A definition -// CHECK: | | `-ClassTemplateDecl 0x[[TestNestedClassRedecl_B_T1:[^ ]+]] class TT> struct AA {}; + template class TT> struct A {}; template class B {}; - template struct AA; -// DUMP-LABEL: NamespaceDecl {{.*}} test7{{$}} -// DUMP: ClassTemplateDecl 0x{{.+}} AA{{$}} + template struct A; +// DUMP-LABEL: NamespaceDecl {{.*}} test7 external-linkage{{$}} +// DUMP: ClassTemplateDecl 0x{{.+}} A external-linkage{{$}} // DUMP-NEXT: |-TemplateTemplateParmDecl // DUMP-NEXT: | `-TemplateTypeParmDecl -// DUMP-NEXT: |-CXXRecordDecl 0x[[TEST7_PAT:[^ ]+]] {{.+}} struct AA definition -// DUMP: ClassTemplateSpecializationDecl {{.*}} struct AA definition instantiated_from 0x[[TEST7_PAT]] explicit_instantiation_definition strict-pack-match{{$}} +// DUMP-NEXT: |-CXXRecordDecl 0x[[TEST7_PAT:[^ ]+]] {{.+}} struct A definition +// DUMP: ClassTemplateSpecializationDecl {{.*}} struct A definition external-linkage instantiated_from 0x[[TEST7_PAT]] explicit_instantiation_definition strict-pack-match{{$}} // JSON-LABEL: "name": "test7", // JSON: "kind": "ClassTemplateSpecializationDecl", -// JSON: "name": "AA", +// JSON: "name": "A", // JSON-NEXT: "tagUsed": "struct", // JSON-NEXT: "completeDefinition": true, // JSON-NEXT: "strict-pack-match": true, @@ -210,7 +210,7 @@ template<_Complex int x> struct pr126341; template<> struct pr126341<{1, 2}>; -// DUMP-LABEL: NamespaceDecl {{.*}} test8{{$}} +// DUMP-LABEL: NamespaceDecl {{.*}} test8 external-linkage{{$}} // DUMP-NEXT: |-ClassTemplateDecl {{.*}} pr126341 // DUMP: `-ClassTemplateSpecializationDecl {{.*}} pr126341 // DUMP: `-TemplateArgument structural value '1+2i' @@ -228,7 +228,7 @@ struct pr126341<{1, 2}>; namespace TestMemberPointerPartialSpec { template struct A; template struct A; -// DUMP-LABEL: NamespaceDecl {{.+}} TestMemberPointerPartialSpec{{$}} +// DUMP-LABEL: NamespaceDecl {{.+}} TestMemberPointerPartialSpec external-linkage{{$}} // DUMP: ClassTemplatePartialSpecializationDecl {{.*}} struct A // DUMP-NEXT: |-TemplateArgument type 'type-parameter-0-0 type-parameter-0-1::*' // DUMP-NEXT: | `-MemberPointerType {{.+}} 'type-parameter-0-0 type-parameter-0-1::*' dependent @@ -291,7 +291,7 @@ namespace TestDependentMemberPointer { using Y = int U::test::*; using Z = int U::template V::*; }; -// DUMP-LABEL: NamespaceDecl {{.+}} TestDependentMemberPointer{{$}} +// DUMP-LABEL: NamespaceDecl {{.+}} TestDependentMemberPointer external-linkage{{$}} // DUMP: |-TypeAliasDecl {{.+}} X 'int U::*'{{$}} // DUMP-NEXT: | `-MemberPointerType {{.+}} 'int U::*' dependent // DUMP-NEXT: | |-TemplateTypeParmType {{.+}} 'U' dependent depth 0 index 0 @@ -434,7 +434,7 @@ namespace TestDependentMemberPointer { } // namespace TestDependentMemberPointer namespace TestPartialSpecNTTP { -// DUMP-LABEL: NamespaceDecl {{.+}} TestPartialSpecNTTP{{$}} +// DUMP-LABEL: NamespaceDecl {{.+}} TestPartialSpecNTTP external-linkage{{$}} // JSON-LABEL: "name": "TestPartialSpecNTTP" template struct Template1 {}; template struct Template2 {}; @@ -581,7 +581,7 @@ namespace TestPartialSpecNTTP { template struct Template2, U3> {}; -// DUMP: ClassTemplatePartialSpecializationDecl {{.+}} struct Template2 definition explicit_specialization +// DUMP: ClassTemplatePartialSpecializationDecl {{.+}} struct Template2 definition external-linkage explicit_specialization // DUMP: |-TemplateArgument type 'TestPartialSpecNTTP::Template1' // DUMP-NEXT: | `-TemplateSpecializationType {{.+}} 'TestPartialSpecNTTP::Template1' dependent // DUMP-NEXT: | |-name: 'TestPartialSpecNTTP::Template1' @@ -721,7 +721,7 @@ namespace TestPartialSpecNTTP { } // namespace TestPartialSpecNTTP namespace GH153540 { -// DUMP-LABEL: NamespaceDecl {{.*}} GH153540{{$}} +// DUMP-LABEL: NamespaceDecl {{.*}} GH153540 external-linkage{{$}} // JSON-LABEL: "name": "GH153540", namespace N { @@ -791,7 +791,7 @@ namespace GH153540 { } // namespace GH153540 namespace AliasDependentTemplateSpecializationType { -// DUMP-LABEL: NamespaceDecl {{.*}} AliasDependentTemplateSpecializationType{{$}} +// DUMP-LABEL: NamespaceDecl {{.*}} AliasDependentTemplateSpecializationType external-linkage{{$}} // JSON-LABEL: "name": "AliasDependentTemplateSpecializationType", template class TT> using T1 = TT; @@ -864,7 +864,7 @@ namespace AliasDependentTemplateSpecializationType { } // namespace namespace TestAbbreviatedTemplateDecls { -// DUMP-LABEL: NamespaceDecl {{.*}} TestAbbreviatedTemplateDecls{{$}} +// DUMP-LABEL: NamespaceDecl {{.*}} TestAbbreviatedTemplateDecls external-linkage{{$}} // JSON-LABEL: "name": "TestAbbreviatedTemplateDecls", void abbreviated(auto); diff --git a/clang/test/AST/ast-dump-type-callingconv.cpp b/clang/test/AST/ast-dump-type-callingconv.cpp index 1611223acbc80..71aae65bddff1 100644 --- a/clang/test/AST/ast-dump-type-callingconv.cpp +++ b/clang/test/AST/ast-dump-type-callingconv.cpp @@ -1,11 +1,11 @@ // RUN: %clang_cc1 -triple aarch64 -ast-dump -ast-dump-filter foo %s \ // RUN: | FileCheck --strict-whitespace %s -// CHECK: foo1 'void () __attribute__((device_kernel))'{{$}} +// CHECK: foo1 'void () __attribute__((device_kernel))' external-linkage{{$}} void foo1() __attribute__((device_kernel)); -// CHECK: foo2 'void () __attribute__((aarch64_vector_pcs))'{{$}} +// CHECK: foo2 'void () __attribute__((aarch64_vector_pcs))' external-linkage{{$}} void foo2() __attribute__((aarch64_vector_pcs)); -// CHECK: foo3 'void () __attribute__((aarch64_sve_pcs))'{{$}} +// CHECK: foo3 'void () __attribute__((aarch64_sve_pcs))' external-linkage{{$}} void foo3() __attribute__((aarch64_sve_pcs)); diff --git a/clang/test/AST/attr-lifetime-capture-by.cpp b/clang/test/AST/attr-lifetime-capture-by.cpp index 76efd45304447..8770c6c822934 100644 --- a/clang/test/AST/attr-lifetime-capture-by.cpp +++ b/clang/test/AST/attr-lifetime-capture-by.cpp @@ -42,7 +42,7 @@ struct map { struct [[gsl::Pointer()]] View {}; std::vector views; -// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: CXXMethodDecl {{.*}} push_back 'void (const View &)' // CHECK-NEXT: ParmVarDecl {{.*}} 'const View &' @@ -59,7 +59,7 @@ std::vector views; template struct [[gsl::Pointer()]] ViewTemplate {}; std::vector> templated_views; -// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: CXXMethodDecl {{.*}} push_back 'void (const ViewTemplate &)' // CHECK-NEXT: ParmVarDecl {{.*}} 'const ViewTemplate &' @@ -76,7 +76,7 @@ std::vector> templated_views; // CHECK-NEXT: LifetimeCaptureByAttr {{.*}} Implicit std::vector pointers; -// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: CXXMethodDecl {{.*}} push_back 'void (int *const &)' // CHECK-NEXT: ParmVarDecl {{.*}} 'int *const &' @@ -92,7 +92,7 @@ std::vector pointers; // CHECK-NOT: LifetimeCaptureByAttr std::vector ints; -// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK: ClassTemplateSpecializationDecl {{.*}} struct vector definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: TemplateArgument type 'int' // CHECK: CXXMethodDecl {{.*}} push_back 'void (const int &)' @@ -107,7 +107,7 @@ std::vector ints; // CHECK-NOT: LifetimeCaptureByAttr std::map map; -// CHECK: ClassTemplateSpecializationDecl {{.*}} struct map definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK: ClassTemplateSpecializationDecl {{.*}} struct map definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: CXXMethodDecl {{.*}} operator[] 'int &(View &&)' implicit_instantiation // CHECK-NEXT: ParmVarDecl {{.*}} p 'View &&' diff --git a/clang/test/AST/multistep-explicit-cast.c b/clang/test/AST/multistep-explicit-cast.c index 5d85669c22ab4..6badfa7750588 100644 --- a/clang/test/AST/multistep-explicit-cast.c +++ b/clang/test/AST/multistep-explicit-cast.c @@ -11,7 +11,7 @@ // while in explicit casts, the implicitly-inserted implicit casts are marked with 'part_of_explicit_cast' unsigned char implicitcast_0(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_0 'unsigned char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_0 'unsigned char (unsigned int)' external-linkage{{$}} // CHECK: ImplicitCastExpr {{.*}} 'unsigned char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' {{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'unsigned int' lvalue ParmVar {{.*}} 'x' 'unsigned int'{{$}} @@ -19,7 +19,7 @@ unsigned char implicitcast_0(unsigned int x) { } signed char implicitcast_1(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_1 'signed char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_1 'signed char (unsigned int)' external-linkage{{$}} // CHECK: ImplicitCastExpr {{.*}} 'signed char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' {{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'unsigned int' lvalue ParmVar {{.*}} 'x' 'unsigned int'{{$}} @@ -27,7 +27,7 @@ signed char implicitcast_1(unsigned int x) { } unsigned char implicitcast_2(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_2 'unsigned char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_2 'unsigned char (int)' external-linkage{{$}} // CHECK: ImplicitCastExpr {{.*}} 'unsigned char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' {{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int'{{$}} @@ -35,7 +35,7 @@ unsigned char implicitcast_2(signed int x) { } signed char implicitcast_3(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_3 'signed char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_3 'signed char (int)' external-linkage{{$}} // CHECK: ImplicitCastExpr {{.*}} 'signed char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' {{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int'{{$}} @@ -45,7 +45,7 @@ signed char implicitcast_3(signed int x) { //----------------------------------------------------------------------------// unsigned char cstylecast_0(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_0 'unsigned char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_0 'unsigned char (unsigned int)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'unsigned char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' part_of_explicit_cast{{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'unsigned int' lvalue ParmVar {{.*}} 'x' 'unsigned int'{{$}} @@ -53,7 +53,7 @@ unsigned char cstylecast_0(unsigned int x) { } signed char cstylecast_1(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_1 'signed char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_1 'signed char (unsigned int)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'signed char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' part_of_explicit_cast{{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'unsigned int' lvalue ParmVar {{.*}} 'x' 'unsigned int'{{$}} @@ -61,7 +61,7 @@ signed char cstylecast_1(unsigned int x) { } unsigned char cstylecast_2(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_2 'unsigned char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_2 'unsigned char (int)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'unsigned char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' part_of_explicit_cast{{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int'{{$}} @@ -69,7 +69,7 @@ unsigned char cstylecast_2(signed int x) { } signed char cstylecast_3(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_3 'signed char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_3 'signed char (int)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'signed char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' part_of_explicit_cast{{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int'{{$}} diff --git a/clang/test/AST/multistep-explicit-cast.cpp b/clang/test/AST/multistep-explicit-cast.cpp index 0901c485367c9..c8776b089bd36 100644 --- a/clang/test/AST/multistep-explicit-cast.cpp +++ b/clang/test/AST/multistep-explicit-cast.cpp @@ -11,7 +11,7 @@ // while in explicit casts, the implicitly-inserted implicit casts are marked with 'part_of_explicit_cast' unsigned char implicitcast_0(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_0 'unsigned char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_0 'unsigned char (unsigned int)' external-linkage{{$}} // CHECK: ImplicitCastExpr {{.*}} 'unsigned char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' {{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'unsigned int' lvalue ParmVar {{.*}} 'x' 'unsigned int'{{$}} @@ -19,7 +19,7 @@ unsigned char implicitcast_0(unsigned int x) { } signed char implicitcast_1(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_1 'signed char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_1 'signed char (unsigned int)' external-linkage{{$}} // CHECK: ImplicitCastExpr {{.*}} 'signed char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' {{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'unsigned int' lvalue ParmVar {{.*}} 'x' 'unsigned int'{{$}} @@ -27,7 +27,7 @@ signed char implicitcast_1(unsigned int x) { } unsigned char implicitcast_2(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_2 'unsigned char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_2 'unsigned char (int)' external-linkage{{$}} // CHECK: ImplicitCastExpr {{.*}} 'unsigned char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' {{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int'{{$}} @@ -35,7 +35,7 @@ unsigned char implicitcast_2(signed int x) { } signed char implicitcast_3(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_3 'signed char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} implicitcast_3 'signed char (int)' external-linkage{{$}} // CHECK: ImplicitCastExpr {{.*}} 'signed char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' {{$}} // CHECK-NEXT: DeclRefExpr {{.*}} 'int' lvalue ParmVar {{.*}} 'x' 'int'{{$}} @@ -45,7 +45,7 @@ signed char implicitcast_3(signed int x) { //----------------------------------------------------------------------------// unsigned char cstylecast_0(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_0 'unsigned char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_0 'unsigned char (unsigned int)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'unsigned char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' part_of_explicit_cast{{$}} @@ -54,7 +54,7 @@ unsigned char cstylecast_0(unsigned int x) { } signed char cstylecast_1(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_1 'signed char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_1 'signed char (unsigned int)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'signed char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'signed char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' part_of_explicit_cast{{$}} @@ -63,7 +63,7 @@ signed char cstylecast_1(unsigned int x) { } unsigned char cstylecast_2(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_2 'unsigned char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_2 'unsigned char (int)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'unsigned char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' part_of_explicit_cast{{$}} @@ -72,7 +72,7 @@ unsigned char cstylecast_2(signed int x) { } signed char cstylecast_3(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_3 'signed char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cstylecast_3 'signed char (int)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'signed char' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'signed char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' part_of_explicit_cast{{$}} @@ -83,7 +83,7 @@ signed char cstylecast_3(signed int x) { //----------------------------------------------------------------------------// unsigned char cxxstaticcast_0(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxstaticcast_0 'unsigned char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxstaticcast_0 'unsigned char (unsigned int)' external-linkage{{$}} // CHECK: CXXStaticCastExpr {{.*}} 'unsigned char' static_cast {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' part_of_explicit_cast{{$}} @@ -92,7 +92,7 @@ unsigned char cxxstaticcast_0(unsigned int x) { } signed char cxxstaticcast_1(unsigned int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxstaticcast_1 'signed char (unsigned int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxstaticcast_1 'signed char (unsigned int)' external-linkage{{$}} // CHECK: CXXStaticCastExpr {{.*}} 'signed char' static_cast {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'signed char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned int' part_of_explicit_cast{{$}} @@ -101,7 +101,7 @@ signed char cxxstaticcast_1(unsigned int x) { } unsigned char cxxstaticcast_2(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxstaticcast_2 'unsigned char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxstaticcast_2 'unsigned char (int)' external-linkage{{$}} // CHECK: CXXStaticCastExpr {{.*}} 'unsigned char' static_cast {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'unsigned char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' part_of_explicit_cast{{$}} @@ -110,7 +110,7 @@ unsigned char cxxstaticcast_2(signed int x) { } signed char cxxstaticcast_3(signed int x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxstaticcast_3 'signed char (int)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxstaticcast_3 'signed char (int)' external-linkage{{$}} // CHECK: CXXStaticCastExpr {{.*}} 'signed char' static_cast {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'signed char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'int' part_of_explicit_cast{{$}} @@ -126,7 +126,7 @@ using UnsignedInt = unsigned int; using SignedInt = signed int; UnsignedChar cxxfunctionalcast_0(UnsignedInt x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxfunctionalcast_0 'UnsignedChar (UnsignedInt)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxfunctionalcast_0 'UnsignedChar (UnsignedInt)' external-linkage{{$}} // CHECK: CXXFunctionalCastExpr {{.*}} 'UnsignedChar':'unsigned char' functional cast to UnsignedChar {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'UnsignedChar':'unsigned char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'UnsignedInt':'unsigned int' part_of_explicit_cast{{$}} @@ -135,7 +135,7 @@ UnsignedChar cxxfunctionalcast_0(UnsignedInt x) { } SignedChar cxxfunctionalcast_1(UnsignedInt x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxfunctionalcast_1 'SignedChar (UnsignedInt)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxfunctionalcast_1 'SignedChar (UnsignedInt)' external-linkage{{$}} // CHECK: CXXFunctionalCastExpr {{.*}} 'SignedChar':'signed char' functional cast to SignedChar {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'SignedChar':'signed char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'UnsignedInt':'unsigned int' part_of_explicit_cast{{$}} @@ -144,7 +144,7 @@ SignedChar cxxfunctionalcast_1(UnsignedInt x) { } UnsignedChar cxxfunctionalcast_2(SignedInt x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxfunctionalcast_2 'UnsignedChar (SignedInt)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxfunctionalcast_2 'UnsignedChar (SignedInt)' external-linkage{{$}} // CHECK: CXXFunctionalCastExpr {{.*}} 'UnsignedChar':'unsigned char' functional cast to UnsignedChar {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'UnsignedChar':'unsigned char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'SignedInt':'int' part_of_explicit_cast{{$}} @@ -153,7 +153,7 @@ UnsignedChar cxxfunctionalcast_2(SignedInt x) { } SignedChar cxxfunctionalcast_3(SignedInt x) { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxfunctionalcast_3 'SignedChar (SignedInt)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} cxxfunctionalcast_3 'SignedChar (SignedInt)' external-linkage{{$}} // CHECK: CXXFunctionalCastExpr {{.*}} 'SignedChar':'signed char' functional cast to SignedChar {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'SignedChar':'signed char' part_of_explicit_cast{{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'SignedInt':'int' part_of_explicit_cast{{$}} diff --git a/clang/test/ASTSYCL/ast-dump-sycl-kernel-call-stmt.cpp b/clang/test/ASTSYCL/ast-dump-sycl-kernel-call-stmt.cpp index 9563892398da9..1047302d8f36e 100644 --- a/clang/test/ASTSYCL/ast-dump-sycl-kernel-call-stmt.cpp +++ b/clang/test/ASTSYCL/ast-dump-sycl-kernel-call-stmt.cpp @@ -40,7 +40,7 @@ void sycl_kernel_launch(const char *, Ts...) {} [[clang::sycl_kernel_entry_point(KN<1>)]] void skep1() { } -// CHECK: |-FunctionDecl {{.*}} skep1 'void ()' +// CHECK: |-FunctionDecl {{.*}} skep1 'void ()' external-linkage // CHECK-NEXT: | |-SYCLKernelCallStmt {{.*}} // CHECK-NEXT: | | |-CompoundStmt {{.*}} // CHECK-NEXT: | | |-CompoundStmt {{.*}} @@ -60,7 +60,7 @@ void skep2(KT k) { } template void skep2>(K<2>); -// CHECK: |-FunctionTemplateDecl {{.*}} skep2 +// CHECK: |-FunctionTemplateDecl {{.*}} skep2 external-linkage // CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} KNT // CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} KT // CHECK-NEXT: | |-FunctionDecl {{.*}} skep2 'void (KT)' @@ -75,7 +75,7 @@ void skep2>(K<2>); // CHECK-NEXT: | | | `-TemplateTypeParm {{.*}} 'KNT' // CHECK-NEXT: | | `-SYCLKernelEntryPointAttr {{.*}} KNT -// CHECK-NEXT: | `-FunctionDecl {{.*}} skep2 'void (K<2>)' explicit_instantiation_definition instantiated_from 0x{{.+}} +// CHECK-NEXT: | `-FunctionDecl {{.*}} skep2 'void (K<2>)' explicit_instantiation_definition instantiated_from 0x{{.+}} external-linkage // CHECK-NEXT: | |-TemplateArgument type 'KN<2>' // CHECK-NEXT: | | `-RecordType {{.*}} 'KN<2>' canonical // CHECK-NEXT: | | `-ClassTemplateSpecialization {{.*}} 'KN' @@ -119,7 +119,7 @@ template<> void skep3>(K<3> k) { k(); } -// CHECK: |-FunctionTemplateDecl {{.*}} skep3 +// CHECK: |-FunctionTemplateDecl {{.*}} skep3 external-linkage // CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} KNT // CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} KT // CHECK-NEXT: | |-FunctionDecl {{.*}} skep3 'void (KT)' @@ -135,7 +135,7 @@ void skep3>(K<3> k) { // CHECK-NEXT: | | `-SYCLKernelEntryPointAttr {{.*}} KNT // CHECK-NEXT: | `-Function {{.*}} 'skep3' 'void (K<3>)' -// CHECK-NEXT: |-FunctionDecl {{.*}} skep3 'void (K<3>)' explicit_specialization +// CHECK-NEXT: |-FunctionDecl {{.*}} skep3 'void (K<3>)' explicit_specialization external-linkage // CHECK-NEXT: | |-TemplateArgument type 'KN<3>' // CHECK-NEXT: | | `-RecordType {{.*}} 'KN<3>' canonical // CHECK-NEXT: | | `-ClassTemplateSpecialization {{.*}} 'KN' @@ -173,7 +173,7 @@ void skep3>(K<3> k) { void skep4(K<4> k, int p1, int p2) { k(p1, p2); } -// CHECK: |-FunctionDecl {{.*}} skep4 'void (K<4>, int, int)' +// CHECK: |-FunctionDecl {{.*}} skep4 'void (K<4>, int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} k 'K<4>' // CHECK-NEXT: | |-ParmVarDecl {{.*}} p1 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} p2 'int' @@ -225,7 +225,7 @@ void skep5(int unused1, K<5> k, int unused2, int p, int unused3) { int lv = 4; k(slv, 1, p, 3, lv, 5, []{ return 6; }); } -// CHECK: |-FunctionDecl {{.*}} skep5 'void (int, K<5>, int, int, int)' +// CHECK: |-FunctionDecl {{.*}} skep5 'void (int, K<5>, int, int, int)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} unused1 'int' // CHECK-NEXT: | |-ParmVarDecl {{.*}} used k 'K<5>' // CHECK-NEXT: | |-ParmVarDecl {{.*}} unused2 'int' @@ -291,7 +291,7 @@ struct S6 { void skep6(const S6 &k) { k(); } -// CHECK: |-FunctionDecl {{.*}} skep6 'void (const S6 &)' +// CHECK: |-FunctionDecl {{.*}} skep6 'void (const S6 &)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} used k 'const S6 &' // CHECK-NEXT: | |-SYCLKernelCallStmt {{.*}} // CHECK-NEXT: | | |-CompoundStmt {{.*}} @@ -328,10 +328,10 @@ struct S7 { void skep7(S7 k) { k(); } -// CHECK: |-FunctionDecl {{.*}} skep7 'void (S7)' +// CHECK: |-FunctionDecl {{.*}} skep7 'void (S7)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} k 'S7' // CHECK-NEXT: | `-SYCLKernelEntryPointAttr {{.*}} KN<7> -// CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep7 'void (S7)' +// CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep7 'void (S7)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} used k 'S7' // CHECK-NEXT: | |-SYCLKernelCallStmt {{.*}} // CHECK-NEXT: | | |-CompoundStmt {{.*}} @@ -370,7 +370,7 @@ struct S8 { void skep8(S8 k) { k(); } -// CHECK: |-FunctionDecl {{.*}} skep8 'void (S8)' +// CHECK: |-FunctionDecl {{.*}} skep8 'void (S8)' external-linkage // CHECK-NEXT: | |-ParmVarDecl {{.*}} used k 'S8' // CHECK-NEXT: | |-SYCLKernelCallStmt {{.*}} // CHECK-NEXT: | | |-CompoundStmt {{.*}} @@ -401,7 +401,7 @@ void foo() { H.skep9>([=] (int a, int b) { return a+b; }, 1, 2); } -// CHECK: | |-FunctionTemplateDecl {{.*}} skep9 +// CHECK: | |-FunctionTemplateDecl {{.*}} skep9 external-linkage // CHECK-NEXT: | | |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 0 KNT // CHECK-NEXT: | | |-TemplateTypeParmDecl {{.*}} referenced typename depth 0 index 1 KT // CHECK-NEXT: | | |-CXXMethodDecl {{.*}} skep9 'void (KT, int, int)' implicit-inline @@ -470,4 +470,4 @@ void foo() { void the_end() {} -// CHECK: `-FunctionDecl {{.*}} the_end 'void ()' +// CHECK: `-FunctionDecl {{.*}} the_end 'void ()' external-linkage diff --git a/clang/test/ASTSYCL/ast-dump-sycl-kernel-entry-point.cpp b/clang/test/ASTSYCL/ast-dump-sycl-kernel-entry-point.cpp index 011f48e91c292..cf7db46b3567e 100644 --- a/clang/test/ASTSYCL/ast-dump-sycl-kernel-entry-point.cpp +++ b/clang/test/ASTSYCL/ast-dump-sycl-kernel-entry-point.cpp @@ -34,21 +34,21 @@ void sycl_kernel_launch(const char *, Ts... Args) {} [[clang::sycl_kernel_entry_point(KN<1>)]] void skep1() { } -// CHECK: |-FunctionDecl {{.*}} skep1 'void ()' +// CHECK: |-FunctionDecl {{.*}} skep1 'void ()' external-linkage // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<1> using KN2 = KN<2>; [[clang::sycl_kernel_entry_point(KN2)]] void skep2() { } -// CHECK: |-FunctionDecl {{.*}} skep2 'void ()' +// CHECK: |-FunctionDecl {{.*}} skep2 'void ()' external-linkage // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN2 template using KNT = KN; [[clang::sycl_kernel_entry_point(KNT<3>)]] void skep3() { } -// CHECK: |-FunctionDecl {{.*}} skep3 'void ()' +// CHECK: |-FunctionDecl {{.*}} skep3 'void ()' external-linkage // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KNT<3> template @@ -56,7 +56,7 @@ template void skep4(F f) { f(); } -// CHECK: |-FunctionTemplateDecl {{.*}} skep4 +// CHECK: |-FunctionTemplateDecl {{.*}} skep4 external-linkage // CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} KNT // CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} F // CHECK-NEXT: | |-FunctionDecl {{.*}} skep4 'void (F)' @@ -65,24 +65,24 @@ void skep4(F f) { void test_skep4() { skep4>([]{}); } -// CHECK: | `-FunctionDecl {{.*}} used skep4 'void ((lambda at {{.*}}))' implicit_instantiation instantiated_from 0x{{.+}} +// CHECK: | `-FunctionDecl {{.*}} used skep4 'void ((lambda at {{.*}}))' implicit_instantiation instantiated_from 0x{{.+}} external-linkage // CHECK-NEXT: | |-TemplateArgument type 'KN<4>' // CHECK: | |-TemplateArgument type '(lambda at {{.*}})' // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} struct KN<4> -// CHECK-NEXT: |-FunctionDecl {{.*}} test_skep4 'void ()' +// CHECK-NEXT: |-FunctionDecl {{.*}} test_skep4 'void ()' external-linkage template [[clang::sycl_kernel_entry_point(KNT)]] void skep5(T) { } -// CHECK: |-FunctionTemplateDecl {{.*}} skep5 +// CHECK: |-FunctionTemplateDecl {{.*}} skep5 external-linkage // CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} KNT // CHECK-NEXT: | |-TemplateTypeParmDecl {{.*}} T // CHECK-NEXT: | |-FunctionDecl {{.*}} skep5 'void (T)' // CHECK: | | `-SYCLKernelEntryPointAttr {{.*}} KNT // Checks for the explicit template instantiation declaration below. -// CHECK: | `-FunctionDecl {{.*}} skep5 'void (int)' explicit_instantiation_definition instantiated_from 0x{{.+}} +// CHECK: | `-FunctionDecl {{.*}} skep5 'void (int)' explicit_instantiation_definition instantiated_from 0x{{.+}} external-linkage // CHECK-NEXT: | |-TemplateArgument type 'KN<5, 4>' // CHECK: | |-TemplateArgument type 'int' // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 4> @@ -96,7 +96,7 @@ void skep5(T) { template<> void skep5>(short) { } -// CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (short)' explicit_specialization +// CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (short)' explicit_specialization external-linkage // CHECK-NEXT: | |-TemplateArgument type 'KN<5, 1>' // CHECK: | |-TemplateArgument type 'short' // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} Inherited struct KN<5, 1> @@ -105,7 +105,7 @@ template<> [[clang::sycl_kernel_entry_point(KN<5,2>)]] void skep5>(long) { } -// CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (long)' explicit_specialization +// CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (long)' explicit_specialization external-linkage // CHECK-NEXT: | |-TemplateArgument type 'KN<5, 2>' // CHECK: | |-TemplateArgument type 'long' // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 2> @@ -128,7 +128,7 @@ template<> [[clang::sycl_kernel_entry_point(KN<5,3>)]] void skep5>(long long) { } -// FIXME-CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (long long)' explicit_specialization +// FIXME-CHECK: |-FunctionDecl {{.*}} prev {{.*}} skep5 'void (long long)' explicit_specialization external-linkage // FIXME-CHECK-NEXT: | |-TemplateArgument type 'KN<5, -1>' // FIXME-CHECK: | |-TemplateArgument type 'long long' // FIXME-CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<5, 3> @@ -143,18 +143,18 @@ void skep6(); [[clang::sycl_kernel_entry_point(KN<6>)]] void skep6() { } -// CHECK: |-FunctionDecl {{.*}} skep6 'void ()' +// CHECK: |-FunctionDecl {{.*}} skep6 'void ()' external-linkage // CHECK-NEXT: | `-SYCLKernelEntryPointAttr {{.*}} KN<6> -// CHECK-NEXT: |-FunctionDecl {{.*}} prev {{.*}} skep6 'void ()' +// CHECK-NEXT: |-FunctionDecl {{.*}} prev {{.*}} skep6 'void ()' external-linkage // CHECK: | `-SYCLKernelEntryPointAttr {{.*}} KN<6> // Ensure that matching attributes from the same declaration are ok. [[clang::sycl_kernel_entry_point(KN<7>), clang::sycl_kernel_entry_point(KN<7>)]] void skep7() { } -// CHECK: |-FunctionDecl {{.*}} skep7 'void ()' +// CHECK: |-FunctionDecl {{.*}} skep7 'void ()' external-linkage // CHECK: | |-SYCLKernelEntryPointAttr {{.*}} KN<7> // CHECK-NEXT: | `-SYCLKernelEntryPointAttr {{.*}} KN<7> void the_end() {} -// CHECK: `-FunctionDecl {{.*}} the_end 'void ()' +// CHECK: `-FunctionDecl {{.*}} the_end 'void ()' external-linkage diff --git a/clang/test/CXX/class/class.friend/p7-cxx20.cpp b/clang/test/CXX/class/class.friend/p7-cxx20.cpp index d034fa491d0fd..1376b464f8836 100644 --- a/clang/test/CXX/class/class.friend/p7-cxx20.cpp +++ b/clang/test/CXX/class/class.friend/p7-cxx20.cpp @@ -16,10 +16,10 @@ class X { friend void x(){}; }; -// CHECK-NM: `-CXXRecordDecl {{.*}} line:2:7 class X definition +// CHECK-NM: `-CXXRecordDecl {{.*}} line:2:7 class X definition external-linkage // CHECK-NM: |-CXXRecordDecl {{.*}} col:7 implicit class X // CHECK-NM-NEXT: `-FriendDecl {{.*}} col:15 -// CHECK-NM-NEXT: `-FunctionDecl {{.*}} parent {{.*}} col:15 friend_undeclared x 'void ()' implicit-inline +// CHECK-NM-NEXT: `-FunctionDecl {{.*}} parent {{.*}} col:15 friend_undeclared x 'void ()' implicit-inline external-linkage //--- header-unit.h @@ -27,10 +27,10 @@ class Y { friend void y(){}; }; -// CHECK-HU: `-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header-unit.h:2:1, line:4:1> line:2:7 class Y definition +// CHECK-HU: `-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header-unit.h:2:1, line:4:1> line:2:7 class Y definition external-linkage // CHECK-HU: |-CXXRecordDecl {{.*}} col:7 implicit class Y // CHECK-HU-NEXT: `-FriendDecl {{.*}} col:15 -// CHECK-HU-NEXT: `-FunctionDecl {{.*}} parent {{.*}} col:15 friend_undeclared y 'void ()' implicit-inline +// CHECK-HU-NEXT: `-FunctionDecl {{.*}} parent {{.*}} col:15 friend_undeclared y 'void ()' implicit-inline external-linkage // A textually-included header //--- header.h @@ -65,32 +65,32 @@ extern "C++" class GlobalModule { friend void z5(){}; }; -// CHECK-MOD: |-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header.h:2:1, line:4:1> line:2:7 in M. hidden class A definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header.h:2:1, line:4:1> line:2:7 in M. hidden class A definition external-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M. hidden implicit class A // CHECK-MOD-NEXT: | `-FriendDecl {{.*}} col:15 in M. -// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:15 in M. hidden friend_undeclared a 'void ()' implicit-inline +// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:15 in M. hidden friend_undeclared a 'void ()' implicit-inline external-linkage -// CHECK-MOD: |-CXXRecordDecl {{.*}} line:6:7 in M hidden class Z{{( ReachableWhenImported)?}} definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} line:6:7 in M hidden class Z{{( ReachableWhenImported)?}} definition module-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M hidden implicit class Z{{( ReachableWhenImported)?}} // CHECK-MOD-NEXT: | `-FriendDecl {{.*}} col:15 in M{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:15 in M hidden friend_undeclared z1 'void ()'{{( ReachableWhenImported)?}} +// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:15 in M hidden friend_undeclared z1 'void ()'{{( ReachableWhenImported)?}} module-linkage -// CHECK-MOD: |-CXXRecordDecl {{.*}} line:10:7 in M hidden class Inline{{( ReachableWhenImported)?}} definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} line:10:7 in M hidden class Inline{{( ReachableWhenImported)?}} definition module-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M hidden implicit class Inline{{( ReachableWhenImported)?}} // CHECK-MOD-NEXT: | `-FriendDecl {{.*}} col:22 in M{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:22 in M hidden friend_undeclared z2 'void ()'{{( ReachableWhenImported)?}} inline +// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:22 in M hidden friend_undeclared z2 'void ()'{{( ReachableWhenImported)?}} inline module-linkage -// CHECK-MOD: |-CXXRecordDecl {{.*}} line:14:7 in M hidden class Constexpr{{( ReachableWhenImported)?}} definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} line:14:7 in M hidden class Constexpr{{( ReachableWhenImported)?}} definition module-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M hidden implicit class Constexpr{{( ReachableWhenImported)?}} // CHECK-MOD-NEXT: | `-FriendDecl {{.*}} col:25 in M{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:25 in M hidden constexpr friend_undeclared z3 'void ()'{{( ReachableWhenImported)?}} implicit-inline +// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:25 in M hidden constexpr friend_undeclared z3 'void ()'{{( ReachableWhenImported)?}} implicit-inline module-linkage -// CHECK-MOD: |-CXXRecordDecl {{.*}} line:18:7 in M hidden class Consteval{{( ReachableWhenImported)?}} definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} line:18:7 in M hidden class Consteval{{( ReachableWhenImported)?}} definition module-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M hidden implicit class Consteval{{( ReachableWhenImported)?}} // CHECK-MOD-NEXT: | `-FriendDecl {{.*}} col:25 in M{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:25 in M hidden consteval friend_undeclared z4 'void ()'{{( ReachableWhenImported)?}} implicit-inline +// CHECK-MOD-NEXT: | `-FunctionDecl {{.*}} parent {{.*}} col:25 in M hidden consteval friend_undeclared z4 'void ()'{{( ReachableWhenImported)?}} implicit-inline module-linkage -// CHECK-MOD: `-CXXRecordDecl {{.*}} line:22:20 in M. hidden class GlobalModule{{( ReachableWhenImported)?}} definition +// CHECK-MOD: `-CXXRecordDecl {{.*}} line:22:20 in M. hidden class GlobalModule{{( ReachableWhenImported)?}} definition external-linkage // CHECK-MOD: |-CXXRecordDecl {{.*}} col:20 in M. hidden implicit class GlobalModule{{( ReachableWhenImported)?}} // CHECK-MOD-NEXT: `-FriendDecl {{.*}} col:15 in M.{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: `-FunctionDecl {{.*}} parent {{.*}} col:15 in M. hidden friend_undeclared z5 'void ()'{{( ReachableWhenImported)?}} implicit-inline +// CHECK-MOD-NEXT: `-FunctionDecl {{.*}} parent {{.*}} col:15 in M. hidden friend_undeclared z5 'void ()'{{( ReachableWhenImported)?}} implicit-inline external-linkage diff --git a/clang/test/CXX/class/class.mfct/p1-cxx20.cpp b/clang/test/CXX/class/class.mfct/p1-cxx20.cpp index ce6e58ef0a15d..95708618e62d5 100644 --- a/clang/test/CXX/class/class.mfct/p1-cxx20.cpp +++ b/clang/test/CXX/class/class.mfct/p1-cxx20.cpp @@ -16,9 +16,9 @@ class X { void x(){}; }; -// CHECK-NM: `-CXXRecordDecl {{.*}} line:2:7 class X definition +// CHECK-NM: `-CXXRecordDecl {{.*}} line:2:7 class X definition external-linkage // CHECK-NM: |-CXXRecordDecl {{.*}} col:7 implicit class X -// CHECK-NM-NEXT: `-CXXMethodDecl {{.*}} col:8 x 'void ()' implicit-inline +// CHECK-NM-NEXT: `-CXXMethodDecl {{.*}} col:8 x 'void ()' implicit-inline external-linkage // A header unit header //--- header-unit.h @@ -27,9 +27,9 @@ class Y { void y(){}; }; -// CHECK-HU: `-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header-unit.h:2:1, line:4:1> line:2:7 class Y definition +// CHECK-HU: `-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header-unit.h:2:1, line:4:1> line:2:7 class Y definition external-linkage // CHECK-HU: |-CXXRecordDecl {{.*}} col:7 implicit class Y -// CHECK-HU-NEXT: `-CXXMethodDecl {{.*}} col:8 y 'void ()' implicit-inline +// CHECK-HU-NEXT: `-CXXMethodDecl {{.*}} col:8 y 'void ()' implicit-inline external-linkage // A textually-included header //--- header.h @@ -64,26 +64,26 @@ extern "C++" class GlobalModule { void z(){}; }; -// CHECK-MOD: |-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header.h:2:1, line:4:1> line:2:7 in M. hidden class A definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} <.{{/|\\\\?}}header.h:2:1, line:4:1> line:2:7 in M. hidden class A definition external-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M. hidden implicit class A -// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:8 in M. hidden a 'void ()' implicit-inline +// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:8 in M. hidden a 'void ()' implicit-inline external-linkage -// CHECK-MOD: |-CXXRecordDecl {{.*}} line:6:7 in M hidden class Z{{( ReachableWhenImported)?}} definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} line:6:7 in M hidden class Z{{( ReachableWhenImported)?}} definition module-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M hidden implicit class Z{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:8 in M hidden z 'void ()'{{( ReachableWhenImported)?}} +// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:8 in M hidden z 'void ()'{{( ReachableWhenImported)?}} module-linkage -// CHECK-MOD: |-CXXRecordDecl {{.*}} line:10:7 in M hidden class Inline{{( ReachableWhenImported)?}} definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} line:10:7 in M hidden class Inline{{( ReachableWhenImported)?}} definition module-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M hidden implicit class Inline{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:15 in M hidden z 'void ()'{{( ReachableWhenImported)?}} inline +// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:15 in M hidden z 'void ()'{{( ReachableWhenImported)?}} inline module-linkage -// CHECK-MOD: |-CXXRecordDecl {{.*}} line:14:7 in M hidden class Constexpr{{( ReachableWhenImported)?}} definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} line:14:7 in M hidden class Constexpr{{( ReachableWhenImported)?}} definition module-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M hidden implicit class Constexpr{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:18 in M hidden constexpr z 'void ()'{{( ReachableWhenImported)?}} implicit-inline +// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:18 in M hidden constexpr z 'void ()'{{( ReachableWhenImported)?}} implicit-inline module-linkage -// CHECK-MOD: |-CXXRecordDecl {{.*}} line:18:7 in M hidden class Consteval{{( ReachableWhenImported)?}} definition +// CHECK-MOD: |-CXXRecordDecl {{.*}} line:18:7 in M hidden class Consteval{{( ReachableWhenImported)?}} definition module-linkage // CHECK-MOD: | |-CXXRecordDecl {{.*}} col:7 in M hidden implicit class Consteval{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:18 in M hidden consteval z 'void ()'{{( ReachableWhenImported)?}} implicit-inline +// CHECK-MOD-NEXT: | `-CXXMethodDecl {{.*}} col:18 in M hidden consteval z 'void ()'{{( ReachableWhenImported)?}} implicit-inline module-linkage -// CHECK-MOD: `-CXXRecordDecl {{.*}} line:22:20 in M. hidden class GlobalModule{{( ReachableWhenImported)?}} definition +// CHECK-MOD: `-CXXRecordDecl {{.*}} line:22:20 in M. hidden class GlobalModule{{( ReachableWhenImported)?}} definition external-linkage // CHECK-MOD: |-CXXRecordDecl {{.*}} col:20 in M. hidden implicit class GlobalModule{{( ReachableWhenImported)?}} -// CHECK-MOD-NEXT: `-CXXMethodDecl {{.*}} col:8 in M. hidden z 'void ()'{{( ReachableWhenImported)?}} implicit-inline +// CHECK-MOD-NEXT: `-CXXMethodDecl {{.*}} col:8 in M. hidden z 'void ()'{{( ReachableWhenImported)?}} implicit-inline external-linkage diff --git a/clang/test/ParserHLSL/hlsl_resource_class_attr.hlsl b/clang/test/ParserHLSL/hlsl_resource_class_attr.hlsl index 20ba0ba56a5c1..da9b6e02dc4b9 100644 --- a/clang/test/ParserHLSL/hlsl_resource_class_attr.hlsl +++ b/clang/test/ParserHLSL/hlsl_resource_class_attr.hlsl @@ -28,7 +28,7 @@ template struct MyBuffer2 { __hlsl_resource_t [[hlsl::resource_class(UAV)]] h; }; -// CHECK: ClassTemplateSpecializationDecl 0x{{[0-9a-f]+}} line:[[# @LINE - 4]]:29 referenced struct MyBuffer2 definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK: ClassTemplateSpecializationDecl 0x{{[0-9a-f]+}} line:[[# @LINE - 4]]:29 referenced struct MyBuffer2 definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: TemplateArgument type 'float' // CHECK: BuiltinType 0x{{[0-9a-f]+}} 'float' // CHECK: CXXRecordDecl 0x{{[0-9a-f]+}} col:29 implicit struct MyBuffer2 diff --git a/clang/test/ParserHLSL/hlsl_resource_handle_attrs.hlsl b/clang/test/ParserHLSL/hlsl_resource_handle_attrs.hlsl index b25643b7d9ea3..816d3fc5a94a5 100644 --- a/clang/test/ParserHLSL/hlsl_resource_handle_attrs.hlsl +++ b/clang/test/ParserHLSL/hlsl_resource_handle_attrs.hlsl @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s -// CHECK: ClassTemplateSpecializationDecl {{.*}} class RWBuffer definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK: ClassTemplateSpecializationDecl {{.*}} class RWBuffer definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: TemplateArgument type 'float' // CHECK: BuiltinType {{.*}} 'float' // CHECK: FieldDecl {{.*}} implicit{{.*}} __handle '__hlsl_resource_t @@ -8,7 +8,7 @@ // CHECK-SAME{LITERAL}: [[hlsl::contained_type(float)]] RWBuffer Buffer1; -// CHECK: ClassTemplateSpecializationDecl {{.*}} class RasterizerOrderedBuffer definition instantiated_from 0x{{.+}} implicit_instantiation +// CHECK: ClassTemplateSpecializationDecl {{.*}} class RasterizerOrderedBuffer definition external-linkage instantiated_from 0x{{.+}} implicit_instantiation // CHECK: TemplateArgument type 'vector' // CHECK: ExtVectorType {{.*}} 'vector' 4 // CHECK: BuiltinType {{.*}} 'float' diff --git a/clang/test/SemaOpenCL/multistep-explicit-cast.cl b/clang/test/SemaOpenCL/multistep-explicit-cast.cl index d5ec9d9deb10c..06fc30975771b 100644 --- a/clang/test/SemaOpenCL/multistep-explicit-cast.cl +++ b/clang/test/SemaOpenCL/multistep-explicit-cast.cl @@ -4,7 +4,7 @@ typedef __attribute__((ext_vector_type(2))) char char2; void vectorIncrementDecrementOps() { - // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} vectorIncrementDecrementOps 'void (void)'{{$}} + // CHECK: FunctionDecl {{.*}} <{{.*}}, line:{{.*}}> line:{{.*}} vectorIncrementDecrementOps 'void (void)' external-linkage{{$}} // CHECK: CStyleCastExpr {{.*}} 'char2':'char __attribute__((ext_vector_type(2)))' {{$}} // CHECK-NEXT: ImplicitCastExpr {{.*}} 'char' part_of_explicit_cast{{$}} // CHECK-NEXT: IntegerLiteral {{.*}} 'int' 1{{$}} diff --git a/clang/test/SemaTemplate/deduction-guide.cpp b/clang/test/SemaTemplate/deduction-guide.cpp index 9e5756ffec3fc..94c2352a563bd 100644 --- a/clang/test/SemaTemplate/deduction-guide.cpp +++ b/clang/test/SemaTemplate/deduction-guide.cpp @@ -325,7 +325,7 @@ namespace TTP { // CHECK-NEXT: |-TemplateArgument type 'int' // CHECK-NEXT: | `-BuiltinType {{.+}} 'int'{{$}} // CHECK-NEXT: |-TemplateArgument template 'TTP::A'{{$}} -// CHECK-NEXT: | `-ClassTemplateDecl {{.+}} A{{$}} +// CHECK-NEXT: | `-ClassTemplateDecl {{.+}} A external-linkage{{$}} // CHECK-NEXT: `-ParmVarDecl {{.+}} 'TTP::A'{{$}} // CHECK-NEXT: FunctionProtoType {{.+}} 'auto (TT) -> TTP::B' dependent trailing_return cdecl{{$}} // CHECK-NEXT: |-InjectedClassNameType {{.+}} 'TTP::B' dependent{{$}}