================
@@ -0,0 +1,14 @@
+// RUN: %clang_min_runtime -fsanitize=alignment %s -o %t && %run %t 2>&1 | 
FileCheck %s --check-prefixes=CHECK
+
+void f(int &n) {}
+
+int *t;
+
+int main() {
+  int r;
+  t = (int *)(((char *)&r) + 1);
+  // CHECK: ubsan: type-mismatch by 0x{{[[:xdigit:]]+}} address 
0x{{[[:xdigit:]]+$}}
+  // CHECK-NOT: type-mismatch
+
+  f(*t);
+}
----------------
alazarev wrote:

Done

https://github.com/llvm/llvm-project/pull/152192
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to