| Haojian Wu | c0bd9fa | 2020-07-28 11:59:49 +0200 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++2a -ast-dump -ast-dump-filter Foo %s | FileCheck -strict-whitespace %s |
| 2 | |
| 3 | // Test with serialization: |
| 4 | // RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown -emit-pch -o %t %s |
| 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 \ |
| 7 | // RUN: | FileCheck --strict-whitespace %s |
| 8 | |
| Nathan Ridge | 8924779 | 2020-07-26 22:43:29 -0400 | [diff] [blame^] | 9 | template <typename T> |
| 10 | concept unary_concept = true; |
| 11 | |
| Haojian Wu | c0bd9fa | 2020-07-28 11:59:49 +0200 | [diff] [blame] | 12 | template <typename T, typename U> |
| 13 | concept binary_concept = true; |
| 14 | |
| 15 | template <typename T> |
| 16 | struct Foo { |
| 17 | // CHECK: TemplateTypeParmDecl {{.*}} referenced Concept {{.*}} 'binary_concept' |
| Nathan Ridge | 8924779 | 2020-07-26 22:43:29 -0400 | [diff] [blame^] | 18 | // CHECK-NEXT: |-ConceptSpecializationExpr {{.*}} <col:13, col:31> 'bool' |
| Haojian Wu | c0bd9fa | 2020-07-28 11:59:49 +0200 | [diff] [blame] | 19 | // CHECK-NEXT: `-TemplateArgument {{.*}} type 'int' |
| 20 | template <binary_concept<int> R> |
| 21 | Foo(R); |
| Nathan Ridge | 8924779 | 2020-07-26 22:43:29 -0400 | [diff] [blame^] | 22 | |
| 23 | // CHECK: TemplateTypeParmDecl {{.*}} referenced Concept {{.*}} 'unary_concept' |
| 24 | // CHECK-NEXT: `-ConceptSpecializationExpr {{.*}} <col:13> 'bool' |
| 25 | template <unary_concept R> |
| 26 | Foo(R); |
| Haojian Wu | c0bd9fa | 2020-07-28 11:59:49 +0200 | [diff] [blame] | 27 | }; |