[clang] [clang][bytecode] Apply pointer casts to opaque pointers (PR #223607)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 15 00:14:58 PDT 2026
================
@@ -474,3 +474,15 @@ void AddrLabelDiffSub(void) {
// all-error {{use of undeclared label 'baz'}} \
// pedantic-warning 2{{use of GNU address-of-label extension}}
}
+
+void *memset(void*, int, unsigned long);
+typedef struct Parse Parse;
+struct Parse {
+ int aTempReg;
+ int sLastToken;
+};
+
+Parse sqlite3Prepare_sParse;
+void sqlite3Prepare(void) {
+ memset( ((char *)&sqlite3Prepare_sParse) + sizeof(int), 0, sizeof(int));
+}
----------------
ojhunt wrote:
to avoid ambiguity in the test can we include an addition case with `sizeof(X)` where `X` the field types in the parent type are not `X`?
https://github.com/llvm/llvm-project/pull/223607
More information about the cfe-commits
mailing list