diff --git a/clang/test/SemaCXX/gh84473.cpp b/clang/test/SemaCXX/gh84473.cpp new file mode 100644 index 0000000000000..72f5e9c45b0c4 --- /dev/null +++ b/clang/test/SemaCXX/gh84473.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++23 -fsyntax-only -verify %s +// expected-no-diagnostics + +namespace GH84473_bug { +void f1() { + int b; + (void) [=] [[gnu::regcall]] () { + (void) b; + }; +} +} diff --git a/clang/test/SemaCXX/lambda-expressions.cpp b/clang/test/SemaCXX/lambda-expressions.cpp index 6be338064452e..151d74f21d64d 100644 --- a/clang/test/SemaCXX/lambda-expressions.cpp +++ b/clang/test/SemaCXX/lambda-expressions.cpp @@ -762,12 +762,3 @@ template auto t::operator()(int a) const; // expected-note {{in instantiati } #endif - -namespace GH84473_bug { -void f1() { - int b; - (void) [=] [[gnu::regcall]] () { // expected-warning {{an attribute specifier sequence in this position is a C++23 extension}} - (void) b; - }; -} -}