-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Fixup test added in #155573 to work when the compiler defaults to C++20. #156166
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
Conversation
@llvm/pr-subscribers-clang Author: None (dyung) ChangesThe test added in #155573 assumes the compiler defaults to the current default of C++17. If the compiler is changed to default to C++20, the test fails because the expected warnings about a construct being a C++20 extension are no longer emitted. This change fixes up the test to work in either C++17 or C++20 mode by disabling the warning and removing the check for it as this is not what is being tested here. Full diff: https://github.com/llvm/llvm-project/pull/156166.diff 1 Files Affected:
diff --git a/clang/test/AST/ByteCode/vectors.cpp b/clang/test/AST/ByteCode/vectors.cpp
index 6b41c8d79d5b4..91fec8f86f613 100644
--- a/clang/test/AST/ByteCode/vectors.cpp
+++ b/clang/test/AST/ByteCode/vectors.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=expected,both -flax-vector-conversions=none %s
-// RUN: %clang_cc1 -verify=ref,both -flax-vector-conversions=none %s
+// RUN: %clang_cc1 -Wno-c++20-extensions -fexperimental-new-constant-interpreter -verify=expected,both -flax-vector-conversions=none %s
+// RUN: %clang_cc1 -Wno-c++20-extensions -verify=ref,both -flax-vector-conversions=none %s
typedef int __attribute__((vector_size(16))) VI4;
constexpr VI4 A = {1,2,3,4};
@@ -147,7 +147,7 @@ namespace {
namespace Assign {
constexpr int a2() {
VI a = {0, 0, 0, 0};
- VI b; // both-warning {{C++20 extension}}
+ VI b;
b = {1,1,1,1};
return b[0] + b[1] + b[2] + b[3];
@@ -161,7 +161,7 @@ namespace Assign {
constexpr bool invalid() {
v2int16_t a = {0, 0};
- v2int_t b; // both-warning {{C++20 extension}}
+ v2int_t b;
b = a; // both-error {{incompatible type}}
return true;
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/21997 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/13978 Here is the relevant piece of the build log for the reference
|
The test added in #155573 assumes the compiler defaults to the current default of C++17. If the compiler is changed to default to C++20, the test fails because the expected warnings about a construct being a C++20 extension are no longer emitted. This change fixes up the test to work in either C++17 or C++20 mode by disabling the warning and removing the check for it as this is not what is being tested here.