From 0ef7ca86cf1e28d91113dcf834a61ad155dbb7cb Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Fri, 20 May 2022 06:20:13 -0700 Subject: [PATCH] Fix test from df2a4e to work with 32 bit windows targets. 32 Bit windows includes attribute 'thiscall' on member functions as a default calling convention. This test was not written in a way that works with that, so added wildcards so it is tolerant of it. --- clang/test/SemaCXX/co_await-ast.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/clang/test/SemaCXX/co_await-ast.cpp b/clang/test/SemaCXX/co_await-ast.cpp index 1221e86..1145be3 100644 --- a/clang/test/SemaCXX/co_await-ast.cpp +++ b/clang/test/SemaCXX/co_await-ast.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -std=c++20 -fsyntax-only -ast-dump -ast-dump-filter=foo %s | FileCheck %s --strict-whitespace +// RUN: %clang_cc1 -std=c++20 -triple i386-windows-pc -fsyntax-only -ast-dump -ast-dump-filter=foo %s | FileCheck %s --strict-whitespace namespace std { template struct coroutine_traits; @@ -46,13 +47,13 @@ awaitable foo() { // CHECK: |-CompoundStmt {{.*}} // CHECK: | `-ExprWithCleanups {{.*}} 'void' // CHECK: | `-CoawaitExpr {{.*}} 'void' -// CHECK: | |-CXXTemporaryObjectExpr {{.*}} 'executor' 'void () noexcept' zeroing +// CHECK: | |-CXXTemporaryObjectExpr {{.*}} 'executor' 'void (){{.*}} noexcept' zeroing // CHECK: | |-MaterializeTemporaryExpr {{.*}} 'awaitable_frame::result_t' lvalue // CHECK: | | `-CXXBindTemporaryExpr {{.*}} 'awaitable_frame::result_t' (CXXTemporary {{.*}}) // CHECK: | | `-CXXMemberCallExpr {{.*}} 'awaitable_frame::result_t' // CHECK: | | |-MemberExpr {{.*}} '' .await_transform {{.*}} // CHECK: | | | `-DeclRefExpr {{.*}} 'std::coroutine_traits::promise_type':'awaitable_frame' lvalue Var {{.*}} '__promise' 'std::coroutine_traits::promise_type':'awaitable_frame' -// CHECK: | | `-CXXTemporaryObjectExpr {{.*}} 'executor' 'void () noexcept' zeroing +// CHECK: | | `-CXXTemporaryObjectExpr {{.*}} 'executor' 'void (){{.*}} noexcept' zeroing // CHECK: | |-ExprWithCleanups {{.*}} 'bool' // CHECK: | | `-CXXMemberCallExpr {{.*}} 'bool' // CHECK: | | `-MemberExpr {{.*}} '' .await_ready {{.*}} @@ -63,7 +64,7 @@ awaitable foo() { // CHECK: | | `-CXXMemberCallExpr {{.*}} 'awaitable_frame::result_t' // CHECK: | | |-MemberExpr {{.*}} '' .await_transform {{.*}} // CHECK: | | | `-DeclRefExpr {{.*}} 'std::coroutine_traits::promise_type':'awaitable_frame' lvalue Var {{.*}} '__promise' 'std::coroutine_traits::promise_type':'awaitable_frame' -// CHECK: | | `-CXXTemporaryObjectExpr {{.*}} 'executor' 'void () noexcept' zeroing +// CHECK: | | `-CXXTemporaryObjectExpr {{.*}} 'executor' 'void (){{.*}} noexcept' zeroing // CHECK: | |-ExprWithCleanups {{.*}} 'void' // CHECK: | | `-CXXMemberCallExpr {{.*}} 'void' // CHECK: | | |-MemberExpr {{.*}} '' .await_suspend {{.*}} @@ -73,9 +74,9 @@ awaitable foo() { // CHECK: | | | `-CXXMemberCallExpr {{.*}} 'awaitable_frame::result_t' // CHECK: | | | |-MemberExpr {{.*}} '' .await_transform {{.*}} // CHECK: | | | | `-DeclRefExpr {{.*}} 'std::coroutine_traits::promise_type':'awaitable_frame' lvalue Var {{.*}} '__promise' 'std::coroutine_traits::promise_type':'awaitable_frame' -// CHECK: | | | `-CXXTemporaryObjectExpr {{.*}} 'executor' 'void () noexcept' zeroing +// CHECK: | | | `-CXXTemporaryObjectExpr {{.*}} 'executor' 'void (){{.*}} noexcept' zeroing // CHECK: | | `-ImplicitCastExpr {{.*}} 'std::coroutine_handle':'std::coroutine_handle' -// CHECK: | | `-CXXConstructExpr {{.*}} 'std::coroutine_handle':'std::coroutine_handle' 'void (coroutine_handle &&) noexcept' +// CHECK: | | `-CXXConstructExpr {{.*}} 'std::coroutine_handle':'std::coroutine_handle' 'void (coroutine_handle &&){{.*}} noexcept' // CHECK: | | `-MaterializeTemporaryExpr {{.*}} 'std::coroutine_handle' xvalue // CHECK: | | `-CallExpr {{.*}} 'std::coroutine_handle' // CHECK: | | |-ImplicitCastExpr {{.*}} 'std::coroutine_handle (*)(void *) noexcept' @@ -92,6 +93,6 @@ awaitable foo() { // CHECK: | `-CXXMemberCallExpr {{.*}} 'awaitable_frame::result_t' // CHECK: | |-MemberExpr {{.*}} '' .await_transform {{.*}} // CHECK: | | `-DeclRefExpr {{.*}} 'std::coroutine_traits::promise_type':'awaitable_frame' lvalue Var {{.*}} '__promise' 'std::coroutine_traits::promise_type':'awaitable_frame' -// CHECK: | `-CXXTemporaryObjectExpr {{.*}} 'executor' 'void () noexcept' zeroing +// CHECK: | `-CXXTemporaryObjectExpr {{.*}} 'executor' 'void (){{.*}} noexcept' zeroing // Rest of the generated coroutine statements omitted. -- 2.7.4