github-actions[bot] wrote: <!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning: <details> <summary> You can test this locally with the following command: </summary> ``````````bash git-clang-format --diff 1a2f3309765fdc143fdc3809211fb85d2e2ca341 8322ce12520d1d4ab96b58195bd91f62a7b95c06 -- clang/include/clang/AST/TemplateName.h clang/include/clang/Sema/Sema.h clang/lib/AST/ASTContext.cpp clang/lib/AST/DeclTemplate.cpp clang/lib/AST/ODRHash.cpp clang/lib/AST/TemplateBase.cpp clang/lib/AST/TemplateName.cpp clang/lib/AST/TextNodeDumper.cpp clang/lib/AST/Type.cpp clang/lib/AST/TypePrinter.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaExprMember.cpp clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaTemplateDeduction.cpp clang/lib/Sema/SemaType.cpp clang/lib/Sema/TreeTransform.h clang/test/AST/ast-dump-ctad-alias.cpp clang/test/AST/ast-dump-decl.cpp clang/test/AST/ast-dump-expr.cpp clang/test/AST/ast-dump-template-decls.cpp clang/test/AST/ast-dump-template-name.cpp clang/test/AST/ast-dump-using-template.cpp clang/test/CXX/drs/cwg1xx.cpp clang/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3-2a.cpp clang/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp clang/test/Index/print-type.cpp clang/test/OpenMP/declare_mapper_messages.cpp clang/test/Parser/cxx-template-template-recovery.cpp clang/test/SemaCXX/cxx1y-variable-templates_in_class.cpp clang/test/SemaTemplate/cwg2398.cpp clang/test/SemaTemplate/instantiate-requires-expr.cpp clang/test/SemaTemplate/nested-implicit-deduction-guides.cpp clang/unittests/AST/TemplateNameTest.cpp libcxx/test/std/containers/associative/map/map.cons/deduct.verify.cpp libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.verify.cpp libcxx/test/std/containers/associative/multiset/multiset.cons/deduct.verify.cpp libcxx/test/std/containers/associative/set/set.cons/deduct.verify.cpp libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.verify.cpp libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.verify.cpp libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.verify.cpp libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp libcxx/test/std/containers/sequences/deque/deque.cons/deduct.verify.cpp libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.verify.cpp libcxx/test/std/containers/sequences/list/list.cons/deduct.verify.cpp libcxx/test/std/containers/sequences/vector/vector.cons/deduct.verify.cpp libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.verify.cpp libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.verify.cpp libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.verify.cpp libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.verify.cpp libcxx/test/std/ranges/range.adaptors/range.join/ctad.verify.cpp libcxx/test/std/re/re.regex/re.regex.construct/deduct.verify.cpp libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.verify.cpp `````````` </details> <details> <summary> View the diff from clang-format here. </summary> ``````````diff diff --git a/libcxx/test/std/containers/associative/map/map.cons/deduct.verify.cpp b/libcxx/test/std/containers/associative/map/map.cons/deduct.verify.cpp index b314e6fba6..8dfc015685 100644 --- a/libcxx/test/std/containers/associative/map/map.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/associative/map/map.cons/deduct.verify.cpp @@ -42,63 +42,65 @@ int main(int, char**) { { // cannot deduce Key and T from nothing - std::map m; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + std::map + m; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // cannot deduce Key and T from just (Compare) std::map m(std::less<int>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // cannot deduce Key and T from just (Compare, Allocator) std::map m(std::less<int>{}, std::allocator<PC>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // cannot deduce Key and T from just (Allocator) std::map m(std::allocator<PC>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // refuse to rebind the allocator if Allocator::value_type is not exactly what we expect const P arr[] = { {1,1L}, {2,2L}, {3,3L} }; std::map m(arr, arr + 3, std::allocator<P>()); - // expected-error-re@map:*{{static assertion failed{{( due to requirement '.*')?}}{{.*}}Allocator::value_type must be same type as value_type}} + // expected-error-re@map:*{{static assertion failed{{( due to requirement '.*')?}}{{.*}}Allocator::value_type must be same type as value_type}} } { // cannot convert from some arbitrary unrelated type NotAnAllocator a; - std::map m(a); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + std::map m( + a); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // cannot deduce that the inner braced things should be std::pair and not something else std::map m{ {1,1L}, {2,2L}, {3,3L} }; - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // cannot deduce that the inner braced things should be std::pair and not something else std::map m({ {1,1L}, {2,2L}, {3,3L} }, std::less<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // cannot deduce that the inner braced things should be std::pair and not something else std::map m({ {1,1L}, {2,2L}, {3,3L} }, std::less<int>(), std::allocator<PC>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // cannot deduce that the inner braced things should be std::pair and not something else std::map m({ {1,1L}, {2,2L}, {3,3L} }, std::allocator<PC>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // since we have parens, not braces, this deliberately does not find the initializer_list constructor std::map m(P{1,1L}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } { // since we have parens, not braces, this deliberately does not find the initializer_list constructor std::map m(PC{1,1L}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}map'}} } return 0; diff --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.verify.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.verify.cpp index 795ac19240..18893873d5 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/deduct.verify.cpp @@ -42,22 +42,23 @@ int main(int, char**) { { // cannot deduce Key and T from nothing - std::multimap m; // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + std::multimap + m; // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // cannot deduce Key and T from just (Compare) std::multimap m(std::less<int>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // cannot deduce Key and T from just (Compare, Allocator) std::multimap m(std::less<int>{}, std::allocator<PC>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // cannot deduce Key and T from just (Allocator) std::multimap m(std::allocator<PC>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // refuse to rebind the allocator if Allocator::value_type is not exactly what we expect @@ -68,37 +69,38 @@ int main(int, char**) { // cannot convert from some arbitrary unrelated type NotAnAllocator a; - std::multimap m(a); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + std::multimap m( + a); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // cannot deduce that the inner braced things should be std::pair and not something else std::multimap m{ {1,1L}, {2,2L}, {3,3L} }; - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // cannot deduce that the inner braced things should be std::pair and not something else std::multimap m({ {1,1L}, {2,2L}, {3,3L} }, std::less<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // cannot deduce that the inner braced things should be std::pair and not something else std::multimap m({ {1,1L}, {2,2L}, {3,3L} }, std::less<int>(), std::allocator<PC>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // cannot deduce that the inner braced things should be std::pair and not something else std::multimap m({ {1,1L}, {2,2L}, {3,3L} }, std::allocator<PC>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // since we have parens, not braces, this deliberately does not find the initializer_list constructor std::multimap m(P{1,1L}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } { // since we have parens, not braces, this deliberately does not find the initializer_list constructor std::multimap m(PC{1,1L}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}multimap'}} } return 0; diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.verify.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.verify.cpp index 73487597ca..dbdcebcbbc 100644 --- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.verify.cpp @@ -22,33 +22,49 @@ int main(int, char**) { // queue(Compare, Container, const Alloc); // The '45' is not an allocator - std::priority_queue pri(std::greater<int>(), std::deque<int>({1,2,3}), 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} +std::priority_queue pri( + std::greater<int>(), + std::deque<int>({1, 2, 3}), + 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} } { // queue(const queue&, const Alloc&); // The '45' is not an allocator std::priority_queue<int> source; - std::priority_queue pri(source, 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} + std::priority_queue pri( + source, + 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} } { // priority_queue(Iter, Iter, Comp) // int is not an iterator - std::priority_queue pri(15, 17, std::greater<double>()); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} +std::priority_queue pri( + 15, + 17, + std::greater< + double>()); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} } { // priority_queue(Iter, Iter, Comp, Container) // float is not an iterator - std::priority_queue pri(23.f, 2.f, std::greater<float>(), std::deque<float>()); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} +std::priority_queue pri( + 23.f, + 2.f, + std::greater<float>(), + std::deque< + float>()); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} } // Test the implicit deduction guides { // priority_queue (allocator &) - std::priority_queue pri((std::allocator<int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} -// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. +std::priority_queue pri( + (std::allocator< + int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}priority_queue'}} + // Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. // Also, we can't use {} instead of parens, because that constructs a // stack<allocator<int>, allocator<allocator<int>>> } diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.verify.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.verify.cpp index f85b2cbeb2..1ef8f8a7e2 100644 --- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/deduct.verify.cpp @@ -22,21 +22,27 @@ int main(int, char**) { // queue(const Container&, const Alloc&); // The '45' is not an allocator - std::queue que(std::list<int>{1,2,3}, 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}} +std::queue que( + std::list<int>{1, 2, 3}, + 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}} } { // queue(const queue&, const Alloc&); // The '45' is not an allocator std::queue<int> source; - std::queue que(source, 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}} + std::queue que( + source, + 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}} } // Test the implicit deduction guides { // queue (allocator &) - std::queue que((std::allocator<int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}} -// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. +std::queue que( + (std::allocator< + int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}queue'}} + // Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. // Also, we can't use {} instead of parens, because that constructs a // stack<allocator<int>, allocator<allocator<int>>> } diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.verify.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.verify.cpp index 390df86dd0..3523272e19 100644 --- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/deduct.verify.cpp @@ -28,21 +28,27 @@ int main(int, char**) { // stack(const Container&, const Alloc&); // The '45' is not an allocator - std::stack stk(std::list<int>({1,2,3}), 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}} +std::stack stk( + std::list<int>({1, 2, 3}), + 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}} } { // stack(const stack&, const Alloc&); // The '45' is not an allocator std::stack<int> source; - std::stack stk(source, 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}} + std::stack stk( + source, + 45); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}} } // Test the implicit deduction guides { // stack (allocator &) - std::stack stk((std::allocator<int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}} -// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. +std::stack stk( + (std::allocator< + int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}stack'}} + // Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. // Also, we can't use {} instead of parens, because that constructs a // stack<allocator<int>, allocator<allocator<int>>> } diff --git a/libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp b/libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp index f59b761fad..3fdee4a2b2 100644 --- a/libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/sequences/array/array.cons/deduct.verify.cpp @@ -24,7 +24,10 @@ int main(int, char**) { { - std::array arr{1,2,3L}; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}array'}} + std::array arr{ + 1, + 2, + 3L}; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}array'}} } return 0; diff --git a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.verify.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.verify.cpp index f65e230112..13a1f5d87a 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.cons/deduct.verify.cpp @@ -29,8 +29,10 @@ int main(int, char**) // Test the implicit deduction guides { // deque (allocator &) - std::deque deq((std::allocator<int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}deque'}} -// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. +std::deque deq( + (std::allocator< + int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}deque'}} + // Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. // Also, we can't use {} instead of parens, because that constructs a // deque<allocator<int>, allocator<allocator<int>>> } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.verify.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.verify.cpp index b3c3f73270..73ebaf9588 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/deduct.verify.cpp @@ -29,8 +29,10 @@ int main(int, char**) // Test the implicit deduction guides { // forward_list (allocator &) - std::forward_list fwl((std::allocator<int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}forward_list'}} -// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. +std::forward_list fwl( + (std::allocator< + int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}forward_list'}} + // Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. // Also, we can't use {} instead of parens, because that constructs a // forward_list<allocator<int>, allocator<allocator<int>>> } diff --git a/libcxx/test/std/containers/sequences/list/list.cons/deduct.verify.cpp b/libcxx/test/std/containers/sequences/list/list.cons/deduct.verify.cpp index 370cd38612..56cce57e4d 100644 --- a/libcxx/test/std/containers/sequences/list/list.cons/deduct.verify.cpp +++ b/libcxx/test/std/containers/sequences/list/list.cons/deduct.verify.cpp @@ -29,8 +29,10 @@ int main(int, char**) // Test the implicit deduction guides { // list (allocator &) - std::list lst((std::allocator<int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}list'}} -// Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. +std::list lst( + (std::allocator< + int>())); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}list'}} + // Note: The extra parens are necessary, since otherwise clang decides it is a function declaration. // Also, we can't use {} instead of parens, because that constructs a // deque<allocator<int>, allocator<allocator<int>>> } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.verify.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.verify.cpp index dc0ffd2681..35bafd2d5f 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.verify.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/deduct.verify.cpp @@ -64,41 +64,43 @@ int main(int, char**) using P = std::pair<const int, int>; { // cannot deduce Key from nothing - std::unordered_map m; // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} + std::unordered_map + m; // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} } { // cannot deduce Key from just (Size) - std::unordered_map m(42); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} + std::unordered_map m( + 42); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} } { // cannot deduce Key from just (Size, Hash) std::unordered_map m(42, std::hash<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} } { // cannot deduce Key from just (Size, Hash, Pred) std::unordered_map m(42, std::hash<int>(), std::equal_to<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} } { // cannot deduce Key from just (Size, Hash, Pred, Allocator) std::unordered_map m(42, std::hash<int>(), std::equal_to<int>(), std::allocator<P>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} } { // cannot deduce Key from just (Allocator) std::unordered_map m(std::allocator<P>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} } { // cannot deduce Key from just (Size, Allocator) std::unordered_map m(42, std::allocator<P>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} } { // cannot deduce Key from just (Size, Hash, Allocator) std::unordered_map m(42, std::hash<int>(), std::allocator<P>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_map'}} } return 0; diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.verify.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.verify.cpp index efcbbbce0e..213a360e72 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.verify.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/deduct.verify.cpp @@ -64,41 +64,43 @@ int main(int, char**) using P = std::pair<const int, int>; { // cannot deduce Key from nothing - std::unordered_multimap m; // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} + std::unordered_multimap + m; // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} } { // cannot deduce Key from just (Size) - std::unordered_multimap m(42); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} + std::unordered_multimap m( + 42); // expected-error-re{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} } { // cannot deduce Key from just (Size, Hash) std::unordered_multimap m(42, std::hash<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} } { // cannot deduce Key from just (Size, Hash, Pred) std::unordered_multimap m(42, std::hash<int>(), std::equal_to<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} } { // cannot deduce Key from just (Size, Hash, Pred, Allocator) std::unordered_multimap m(42, std::hash<int>(), std::equal_to<int>(), std::allocator<P>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} } { // cannot deduce Key from just (Allocator) std::unordered_multimap m(std::allocator<P>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} } { // cannot deduce Key from just (Size, Allocator) std::unordered_multimap m(42, std::allocator<P>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} } { // cannot deduce Key from just (Size, Hash, Allocator) std::unordered_multimap m(42, std::hash<int>(), std::allocator<P>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multimap'}} } return 0; diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.verify.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.verify.cpp index 8fd7d1d6c2..4941c7c4e3 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.verify.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/deduct.verify.cpp @@ -55,42 +55,42 @@ int main(int, char**) { // cannot deduce Key from nothing std::unordered_multiset s; - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} } { // cannot deduce Key from just (Size) std::unordered_multiset s(42); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} } { // cannot deduce Key from just (Size, Hash) std::unordered_multiset s(42, std::hash<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} } { // cannot deduce Key from just (Size, Hash, Pred) std::unordered_multiset s(42, std::hash<int>(), std::equal_to<>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} } { // cannot deduce Key from just (Size, Hash, Pred, Allocator) std::unordered_multiset s(42, std::hash<int>(), std::equal_to<>(), std::allocator<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} } { // cannot deduce Key from just (Allocator) std::unordered_multiset s(std::allocator<int>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} } { // cannot deduce Key from just (Size, Allocator) std::unordered_multiset s(42, std::allocator<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} } { // cannot deduce Key from just (Size, Hash, Allocator) std::unordered_multiset s(42, std::hash<short>(), std::allocator<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_multiset'}} } return 0; diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.verify.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.verify.cpp index 26e5f9ae6c..760ffba880 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.verify.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/deduct.verify.cpp @@ -55,42 +55,42 @@ int main(int, char**) { // cannot deduce Key from nothing std::unordered_set s; - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} } { // cannot deduce Key from just (Size) std::unordered_set s(42); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} } { // cannot deduce Key from just (Size, Hash) std::unordered_set s(42, std::hash<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} } { // cannot deduce Key from just (Size, Hash, Pred) std::unordered_set s(42, std::hash<int>(), std::equal_to<>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} } { // cannot deduce Key from just (Size, Hash, Pred, Allocator) std::unordered_set s(42, std::hash<int>(), std::equal_to<>(), std::allocator<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} } { // cannot deduce Key from just (Allocator) std::unordered_set s(std::allocator<int>{}); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} } { // cannot deduce Key from just (Size, Allocator) std::unordered_set s(42, std::allocator<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} } { // cannot deduce Key from just (Size, Hash, Allocator) std::unordered_set s(42, std::hash<short>(), std::allocator<int>()); - // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} + // expected-error-re@-1{{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}unordered_set'}} } return 0; diff --git a/libcxx/test/std/ranges/range.adaptors/range.join/ctad.verify.cpp b/libcxx/test/std/ranges/range.adaptors/range.join/ctad.verify.cpp index de0c108e98..de208ba40a 100644 --- a/libcxx/test/std/ranges/range.adaptors/range.join/ctad.verify.cpp +++ b/libcxx/test/std/ranges/range.adaptors/range.join/ctad.verify.cpp @@ -27,5 +27,6 @@ struct Range { void testExplicitCTAD() { Range<Range<int>> r; - std::ranges::join_view v = r; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::ranges::)?}}join_view'}} + std::ranges::join_view v = + r; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::ranges::)?}}join_view'}} } diff --git a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.verify.cpp b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.verify.cpp index 8ef87cfc64..59ba3a2238 100644 --- a/libcxx/test/std/re/re.regex/re.regex.construct/deduct.verify.cpp +++ b/libcxx/test/std/re/re.regex/re.regex.construct/deduct.verify.cpp @@ -27,13 +27,19 @@ int main(int, char**) { // basic_regex(ForwardIterator, ForwardIterator) // <int> is not an iterator - std::basic_regex re(23, 34); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}basic_regex'}} + std::basic_regex re( + 23, + 34); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}basic_regex'}} } { // basic_regex(ForwardIterator, ForwardIterator, flag_type) // <double> is not an iterator - std::basic_regex re(23.0, 34.0, std::regex_constants::basic); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}basic_regex'}} + std::basic_regex re( + 23.0, + 34.0, + std::regex_constants:: + basic); // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}basic_regex'}} } return 0; diff --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.verify.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.verify.cpp index 364f9b2e95..9a89351e13 100644 --- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.verify.cpp +++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/deduct.verify.cpp @@ -25,7 +25,8 @@ int main(int, char**) // Test the implicit deduction guides { // optional() - std::optional opt; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}optional'}} +std::optional + opt; // expected-error-re {{no viable constructor or deduction guide for deduction of template arguments of '{{(std::)?}}optional'}} } { `````````` </details> https://github.com/llvm/llvm-project/pull/93433 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits