This is an archive of the discontinued LLVM Phabricator instance.

[libc++][NFC] Remove regex matchers for static_assert in .verify tests
AbandonedPublic

Authored by philnik on May 23 2023, 12:53 PM.

Details

Reviewers
Mordante
Group Reviewers
Restricted Project
Summary

This was required due to a diagnostic change in Clang 15, which is the oldest Clang we now support.

Diff Detail

Event Timeline

philnik created this revision.May 23 2023, 12:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 12:54 PM
Herald added a subscriber: wenlei. · View Herald Transcript
philnik requested review of this revision.May 23 2023, 12:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 12:54 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante requested changes to this revision.May 24 2023, 10:16 AM
Mordante added a subscriber: Mordante.

I like the change, but want to see a green CI before looking closer at it.

This revision now requires changes to proceed.May 24 2023, 10:16 AM
H-G-Hristov added inline comments.
libcxx/test/libcxx/atomics/atomics.types.operations/atomics.types.operations.req/atomic_fetch_add.verify.cpp
49

I'm compiling with Apple Clang 14.0.3 which returns "static_assert" but the CI returns "static assertion". I was wondering how to handle that in my tests. I guess that's the way. Wouldn't this change make these tests unusable on Apple Clang 14.0.3 which is supposed to be Clang 15?

H-G-Hristov added a comment.EditedMay 25 2023, 12:30 AM

I don't know if Xcode 14.3 (Apple Clang 14.0.3 base on LLVM15) is a supported compiler but it still outputs static_assert and quotes in the static assert messages unlike the compiler on the CI, which outputs static assertion and no quotes.

I need still:

/ expected-error-re@*:* {{{{(static_assert|static assertion)}} failed due to requirement 'is_same<int, std::pair<const int, int>>::value'{{.*}}Allocator::value_type must be same type as value_type}}
}

An example from memory:

static_assert failed due to requirement 'is_same<int, std::pair<const int, int>>::value' "Allocator::value_type must be same type as value_type"

vs

static assertion failed due to requirement 'is_same<int, std::pair<const int, int>>::value' Allocator::value_type must be same type as value_type

I don't know if Xcode 14.3 (Apple Clang 14.0.3 base on LLVM15) is a supported compiler

Yes it is until XCode 15.0 is released.

philnik abandoned this revision.Sep 27 2023, 7:14 AM