Skip to content

[libc++] Disabled unexpected_disabled test in modules build #144466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

boomanaiden154
Copy link
Contributor

This patch disables unexpected_disabled_cpp17.verify.cpp under clang modules builds because it changes diagnostics criteria post #143423, causing the test to fail.

This patch follows a similar style to
853059a.

This was found when working on trying to land #144033.

This patch disables unexpected_disabled_cpp17.verify.cpp under clang
modules builds because it changes diagnostics criteria post llvm#143423,
causing the test to fail.

This patch follows a similar style to
853059a.

This was found when working on trying to land llvm#144033.
@boomanaiden154 boomanaiden154 requested a review from a team as a code owner June 17, 2025 04:54
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jun 17, 2025
@llvmbot
Copy link
Member

llvmbot commented Jun 17, 2025

@llvm/pr-subscribers-libcxx

Author: Aiden Grossman (boomanaiden154)

Changes

This patch disables unexpected_disabled_cpp17.verify.cpp under clang modules builds because it changes diagnostics criteria post #143423, causing the test to fail.

This patch follows a similar style to
853059a.

This was found when working on trying to land #144033.


Full diff: https://github.com/llvm/llvm-project/pull/144466.diff

1 Files Affected:

  • (modified) libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.verify.cpp (+5)
diff --git a/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.verify.cpp b/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.verify.cpp
index 299cb123fbda3..b92f2baa02e47 100644
--- a/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.verify.cpp
+++ b/libcxx/test/libcxx/depr/exception.unexpected/unexpected_disabled_cpp17.verify.cpp
@@ -8,6 +8,11 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
+// When built with modules, this test gives diagnostics like declaration of
+// 'unexpected' must be imported from module 'std.expected.unexpected' before
+// it is required. Therefore disable it in this configuration.
+// UNSUPPORTED: clang-modules-build
+
 // test unexpected
 
 #include <exception>

Comment on lines +11 to +14
// When built with modules, this test gives diagnostics like declaration of
// 'unexpected' must be imported from module 'std.expected.unexpected' before
// it is required. Therefore disable it in this configuration.
// UNSUPPORTED: clang-modules-build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this problem also arise with every other .verify.cpp test we have that checks for the absence of a type or function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just this one and one other that I could find that already has this workaround. This specific diagnostic is done through typo correction so doesn't fire very often.

@boomanaiden154 boomanaiden154 requested a review from ldionne June 17, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants