aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/builtin-functions.cpp
diff options
context:
space:
mode:
authorTimm Baeder <tbaeder@redhat.com>2024-12-03 07:56:06 +0100
committerGitHub <noreply@github.com>2024-12-03 07:56:06 +0100
commit789551362e20c1adf1f292a256b7276c2045d4e1 (patch)
tree0309a73cb951ecd945b1b8edc50cf90186695b0e /clang/test/AST/ByteCode/builtin-functions.cpp
parent45162635bf657eb0a6cdebc6398fada974981c64 (diff)
downloadllvm-789551362e20c1adf1f292a256b7276c2045d4e1.zip
llvm-789551362e20c1adf1f292a256b7276c2045d4e1.tar.gz
llvm-789551362e20c1adf1f292a256b7276c2045d4e1.tar.bz2
[clang][bytecode] Handle memmove like memcpy (#118431)
This is the same thing for us, except for diagnostic differences.
Diffstat (limited to 'clang/test/AST/ByteCode/builtin-functions.cpp')
-rw-r--r--clang/test/AST/ByteCode/builtin-functions.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/AST/ByteCode/builtin-functions.cpp b/clang/test/AST/ByteCode/builtin-functions.cpp
index dfee35d..b94adfa 100644
--- a/clang/test/AST/ByteCode/builtin-functions.cpp
+++ b/clang/test/AST/ByteCode/builtin-functions.cpp
@@ -1146,4 +1146,11 @@ namespace BuiltinMemcpy {
// both-note {{source of 'memcpy' is nullptr}}
+ constexpr int simpleMove() {
+ int a = 12;
+ int b = 0;
+ __builtin_memmove(&b, &a, sizeof(a));
+ return b;
+ }
+ static_assert(simpleMove() == 12);
}