1
- // RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++2a -ast-dump -ast-dump-filter Foo %s | FileCheck -strict-whitespace %s
1
+ // RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++2a -ast-dump -ast-dump-decl-types -ast-dump- filter Foo %s | FileCheck -strict-whitespace %s
2
2
3
3
// Test with serialization:
4
4
// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown -emit-pch -o %t %s
5
5
// RUN: %clang_cc1 -x c++ -std=c++20 -triple x86_64-unknown-unknown -include-pch %t \
6
- // RUN: -ast-dump-all -ast-dump-filter Foo /dev/null \
6
+ // RUN: -ast-dump-all -ast-dump-decl-types -ast-dump- filter Foo /dev/null \
7
7
// RUN: | FileCheck --strict-whitespace %s
8
8
9
9
template <typename T>
@@ -56,6 +56,9 @@ struct Foo {
56
56
// CHECK: CXXFoldExpr {{.*}} <col:13, col:34>
57
57
template <variadic_concept<int >... Ts>
58
58
Foo ();
59
+
60
+ // CHECK:InjectedClassNameType
61
+ // CHECK-NEXT: CXXRecord {{.*}} 'Foo'
59
62
};
60
63
61
64
namespace GH82628 {
@@ -75,20 +78,28 @@ template <typename T>
75
78
concept Foo = C<T>;
76
79
77
80
// CHECK: TemplateTypeParmDecl {{.*}} Concept {{.*}} 'C' (UsingShadow {{.*}} 'C')
81
+ // CHECK: QualType
82
+ // CHECK-NEXT: `-BuiltinType {{.*}} 'bool'
78
83
template <C T>
79
84
constexpr bool FooVar = false ;
80
85
81
86
// CHECK: ConceptSpecializationExpr {{.*}} UsingShadow {{.*}} 'C'
87
+ // CHECK: QualType
88
+ // CHECK-NEXT: `-BuiltinType {{.*}} 'bool'
82
89
template <typename T> requires C<T>
83
90
constexpr bool FooVar2 = true ;
84
91
85
92
// CHECK: SimpleRequirement
86
93
// CHECK-NEXT: `-ConceptSpecializationExpr {{.*}} UsingShadow {{.*}} 'C'
94
+ // CHECK: QualType
95
+ // CHECK-NEXT: `-BuiltinType {{.*}} 'bool'
87
96
template <typename T> requires requires (T) { C<T>; }
88
97
constexpr bool FooVar3 = true ;
89
98
90
99
// CHECK: NonTypeTemplateParmDecl
91
100
// CHECK-NEXT: `-ConceptSpecializationExpr {{.*}} UsingShadow {{.*}} 'C'
101
+ // CHECK: QualType
102
+ // CHECK-NEXT: `-BuiltinType {{.*}} 'bool'
92
103
template <C auto T>
93
104
constexpr bool FooVar4 = bool (T());
94
105
@@ -97,7 +108,9 @@ constexpr bool FooVar4 = bool(T());
97
108
// CHECK: NonTypeTemplateParmDecl {{.*}} depth 0 index 1 U
98
109
// CHECK-NEXT: `-ConceptSpecializationExpr {{.*}} UsingShadow {{.*}} 'C'
99
110
// CHECK: |-TemplateTypeParmDecl {{.*}} Concept {{.*}} 'C' (UsingShadow {{.*}} 'C') depth 0 index 2 V:auto
100
-
111
+ // CHECK: FunctionProtoType
112
+ // CHECK: `-Concept {{.*}} 'C'
113
+ // CHECK: `-TemplateTypeParm {{.*}} 'V:auto'
101
114
template <C... T, C auto U>
102
115
auto FooFunc (C auto V) -> C decltype(auto ) {
103
116
// FIXME: TypeLocs inside of the function body cannot be dumped via -ast-dump for now.
0 commit comments