As in title,a8f4397426broke CI due to the calling convention not available on certain targets. This patch uses a simpler calling convention and enables the test only when the attribute exists. It's verified that this test crashes the compiler beforea8f4397426so it's the same effect as the previous test. Disabling the test on platforms that don't have the calling convention is fine because it's guarding against a frontend bug.
16 lines
247 B
C++
16 lines
247 B
C++
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -verify -fsyntax-only %s
|
|
// expected-no-diagnostics
|
|
|
|
namespace GH76521 {
|
|
|
|
template <typename T>
|
|
void foo() {
|
|
auto l = []() __attribute__((preserve_most)) {};
|
|
}
|
|
|
|
void bar() {
|
|
foo<int>();
|
|
}
|
|
|
|
}
|