aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/builtin-functions.cpp
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2025-04-29 10:14:15 +0200
committerGitHub <noreply@github.com>2025-04-29 10:14:15 +0200
commit980d027a3f2fbce173ad813a3f01bb51c2c2bc4b (patch)
treecde31a2d2411e14e951a507fe25f231b6811155c /clang/test/AST/ByteCode/builtin-functions.cpp
parent86d8e8d9a617461eb4dae7b49e9a4a59a35024e7 (diff)
downloadllvm-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.cpp4
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}} \