diff options
author | Timm Baeder <tbaeder@redhat.com> | 2025-04-29 10:14:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-29 10:14:15 +0200 |
commit | 980d027a3f2fbce173ad813a3f01bb51c2c2bc4b (patch) | |
tree | cde31a2d2411e14e951a507fe25f231b6811155c /clang/test/AST/ByteCode/builtin-functions.cpp | |
parent | 86d8e8d9a617461eb4dae7b49e9a4a59a35024e7 (diff) | |
download | llvm-980d027a3f2fbce173ad813a3f01bb51c2c2bc4b.zip llvm-980d027a3f2fbce173ad813a3f01bb51c2c2bc4b.tar.gz llvm-980d027a3f2fbce173ad813a3f01bb51c2c2bc4b.tar.bz2 |
[clang][bytecode] Allow This pointers in CPCE mode (#137761)
The outermost function doesn't have a This pointers, but inner calls
can. This still doesn't match the diagnostic output of the current
interpreter properly, but it's closer I think.
Diffstat (limited to 'clang/test/AST/ByteCode/builtin-functions.cpp')
-rw-r--r-- | clang/test/AST/ByteCode/builtin-functions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/AST/ByteCode/builtin-functions.cpp b/clang/test/AST/ByteCode/builtin-functions.cpp index f879360..46f9e48 100644 --- a/clang/test/AST/ByteCode/builtin-functions.cpp +++ b/clang/test/AST/ByteCode/builtin-functions.cpp @@ -48,10 +48,10 @@ static_assert(test_address_of_incomplete_array_type() == 1234, ""); // both-erro constexpr NonTrivial(const NonTrivial &) : n(1) {} int n; }; - constexpr bool test_nontrivial_memcpy() { // ref-error {{never produces a constant}} + constexpr bool test_nontrivial_memcpy() { // both-error {{never produces a constant}} NonTrivial arr[3] = {}; __builtin_memcpy(arr, arr + 1, sizeof(NonTrivial)); // both-note {{non-trivially-copyable}} \ - // ref-note {{non-trivially-copyable}} + // both-note {{non-trivially-copyable}} return true; } static_assert(test_nontrivial_memcpy()); // both-error {{constant}} \ |