Skip to content
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

[Clang] Only check for error in C++20 mode #84624

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

Sirraide
Copy link
Contributor

@Sirraide Sirraide commented Mar 9, 2024

Fix a test that was added in #81014 and which caused buildbots to fail. Only check for the ‘never produces a constant expression error’ in C++20 mode.

This fixes #84623.

@Sirraide Sirraide merged commit 5630dc6 into llvm:main Mar 9, 2024
4 of 5 checks passed
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Mar 9, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 9, 2024

@llvm/pr-subscribers-clang

Author: None (Sirraide)

Changes

Fix a test that was added in #81014 and which caused buildbots to fail. Only check for the ‘never produces a constant expression error’ in C++20 mode.

This fixes #84623.


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

1 Files Affected:

  • (modified) clang/test/SemaCXX/cxx23-assume.cpp (+2-2)
diff --git a/clang/test/SemaCXX/cxx23-assume.cpp b/clang/test/SemaCXX/cxx23-assume.cpp
index 2b99cbd3e788a1..2d7c9b174d9019 100644
--- a/clang/test/SemaCXX/cxx23-assume.cpp
+++ b/clang/test/SemaCXX/cxx23-assume.cpp
@@ -65,8 +65,8 @@ static_assert(h(4) == sizeof(int));
 static_assert(__has_cpp_attribute(assume) == 202207L);
 static_assert(__has_attribute(assume));
 
-constexpr bool i() { // expected-error {{never produces a constant expression}}
-  [[assume(false)]]; // expected-note {{assumption evaluated to false}} expected-note {{assumption evaluated to false}} ext-warning {{C++23 extension}}
+constexpr bool i() { // ext-error {{never produces a constant expression}}
+  [[assume(false)]]; // ext-note {{assumption evaluated to false}} expected-note {{assumption evaluated to false}} ext-warning {{C++23 extension}}
   return true;
 }
 

@Sirraide
Copy link
Contributor Author

Sirraide commented Mar 9, 2024

Merged this w/o review to fix the bots. Should be a trivial change.

@Sirraide Sirraide deleted the fix-assume-test branch March 9, 2024 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buildbot failure after merging #81014
2 participants