aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCXX/PR68542.cpp
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2024-02-23 11:31:09 -0800
committerFlorian Mayer <fmayer@google.com>2024-02-23 11:31:09 -0800
commit8d536f83545f071948888983e2db25ce23a8302d (patch)
treeb46a6c218f811753e98cb07c725c9e9f03224780 /clang/test/SemaCXX/PR68542.cpp
parent214e60250987ad1f305a0fa6a823093d5247ee77 (diff)
parent6dd6d487d012a9000fe975133b7935c1f8c658eb (diff)
downloadllvm-8d536f83545f071948888983e2db25ce23a8302d.zip
llvm-8d536f83545f071948888983e2db25ce23a8302d.tar.gz
llvm-8d536f83545f071948888983e2db25ce23a8302d.tar.bz2
[𝘀𝗽𝗿] changes introduced through rebaseusers/fmayer/sprmain.scudo-allow-to-resize-allocation-ring-buffer
Created using spr 1.3.4 [skip ci]
Diffstat (limited to 'clang/test/SemaCXX/PR68542.cpp')
-rw-r--r--clang/test/SemaCXX/PR68542.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/SemaCXX/PR68542.cpp b/clang/test/SemaCXX/PR68542.cpp
index fc767a7..e266bf9b 100644
--- a/clang/test/SemaCXX/PR68542.cpp
+++ b/clang/test/SemaCXX/PR68542.cpp
@@ -1,20 +1,20 @@
// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
+// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s -fexperimental-new-constant-interpreter
-struct S {
+struct S { // expected-note {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'S &&' for 1st argument}} \
+ // expected-note {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const S &' for 1st argument}}
int e;
};
template<class T>
consteval int get_format() {
- return nullptr; // expected-error{{cannot initialize return object of type 'int' with an rvalue of type 'std::nullptr_t'}}
+ return nullptr; // expected-error {{cannot initialize return object of type 'int' with an rvalue of type 'std::nullptr_t'}}
}
template<class T>
constexpr S f(T) noexcept {
- return get_format<T>(); // expected-error{{no viable conversion from returned value of type 'int' to function return type 'S'}}
+ return get_format<T>(); // expected-error {{no viable conversion from returned value of type 'int' to function return type 'S'}}
}
-constexpr S x = f(0); // expected-error{{constexpr variable 'x' must be initialized by a constant expression}}
-// expected-note@-1{{in instantiation of function template specialization 'f<int>' requested here}}
-// expected-note@3{{candidate constructor (the implicit move constructor) not viable: no known conversion from 'int' to 'S &&' for 1st argument}}
-// expected-note@3{{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const S &' for 1st argument}}
+constexpr S x = f(0); // expected-error {{constexpr variable 'x' must be initialized by a constant expression}} \
+ // expected-note {{in instantiation of function template specialization 'f<int>' requested here}}