diff options
| author | Saar Raz <saar@raz.email> | 2020-01-31 20:05:09 +0200 |
|---|---|---|
| committer | Saar Raz <saar@raz.email> | 2020-01-31 20:10:43 +0200 |
| commit | 8be11623043c54cc42d7d0a7fac7408efce4ef41 (patch) | |
| tree | 881264aa1decb25ed7ecbd3a4e8c8e03653564a6 /clang/test/Parser | |
| parent | 3b32963252bc8580ad8237ded3814e2a6a2ba9b6 (diff) | |
| download | bcm5719-llvm-8be11623043c54cc42d7d0a7fac7408efce4ef41.tar.gz bcm5719-llvm-8be11623043c54cc42d7d0a7fac7408efce4ef41.zip | |
[Concepts] Fix isDeclarationSpecifier to detect type-constraints correctly
isDeclarationSpecifiers did not handle some cases of placeholder-type-specifiers with
type-constraints, causing parsing bugs in abbreviated constructor templates.
Add comprehensive handling of type-constraints to isDeclarationSpecifier.
(cherry picked from commit b7ce85a130789d23c69156f4b899962458d1f05d)
Diffstat (limited to 'clang/test/Parser')
| -rw-r--r-- | clang/test/Parser/cxx2a-abbreviated-templates.cpp | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/clang/test/Parser/cxx2a-abbreviated-templates.cpp b/clang/test/Parser/cxx2a-abbreviated-templates.cpp index e2b3803c807..6562389f767 100644 --- a/clang/test/Parser/cxx2a-abbreviated-templates.cpp +++ b/clang/test/Parser/cxx2a-abbreviated-templates.cpp @@ -9,11 +9,36 @@ namespace ns { concept D = true; } -void foo(C auto a, - C<int> auto b, - ns::D auto c, - ns::D<int> auto d, - const C auto e, - const C<int> auto f, - const ns::D auto g, - const ns::D<int> auto h);
\ No newline at end of file +void foo1(C auto a, + C<int> auto b, + ns::D auto c, + ns::D<int> auto d, + const C auto e, + const C<int> auto f, + const ns::D auto g, + const ns::D<int> auto h); +void foo2(C auto a); +void foo3(C<int> auto b); +void foo4(ns::D auto c); +void foo5(ns::D<int> auto d); +void foo6(const C auto e); +void foo7(const C<int> auto f); +void foo8(const ns::D auto g); +void foo9(const ns::D<int> auto h); + +struct S1 { S1(C auto a, + C<int> auto b, + ns::D auto c, + ns::D<int> auto d, + const C auto e, + const C<int> auto f, + const ns::D auto g, + const ns::D<int> auto h); }; +struct S2 { S2(C auto a); }; +struct S3 { S3(C<int> auto b); }; +struct S4 { S4(ns::D auto c); }; +struct S5 { S5(ns::D<int> auto d); }; +struct S6 { S6(const C auto e); }; +struct S7 { S7(const C<int> auto f); }; +struct S8 { S8(const ns::D auto g); }; +struct S9 { S9(const ns::D<int> auto h); };
\ No newline at end of file |

