Skip to content

Commit

Permalink
[Clang] Fix failing CI with different test case attribute & host trip…
Browse files Browse the repository at this point in the history
…le (#76863)

As in title,
a8f4397
broke 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 before a8f4397 so 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.
  • Loading branch information
yuxuanchen1997 committed Jan 3, 2024
1 parent 155d584 commit 09de5e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/test/SemaCXX/template-instantiation.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// RUN: %clang_cc1 -verify -fsyntax-only -Wno-ignored-attributes %s
// 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__((pcs("aapcs-vfp"))) {};
auto l = []() __attribute__((preserve_most)) {};
}

void bar() {
Expand Down

0 comments on commit 09de5e5

Please sign in to comment.