summaryrefslogtreecommitdiffstats
path: root/tests/codegen/sanitizer_memtag_attr_check.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codegen/sanitizer_memtag_attr_check.rs')
-rw-r--r--tests/codegen/sanitizer_memtag_attr_check.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/codegen/sanitizer_memtag_attr_check.rs b/tests/codegen/sanitizer_memtag_attr_check.rs
new file mode 100644
index 000000000..2fd362656
--- /dev/null
+++ b/tests/codegen/sanitizer_memtag_attr_check.rs
@@ -0,0 +1,12 @@
+// This tests that the sanitize_memtag attribute is
+// applied when enabling the memtag sanitizer.
+//
+// needs-sanitizer-memtag
+// compile-flags: -Zsanitizer=memtag -Ctarget-feature=+mte
+
+#![crate_type = "lib"]
+
+// CHECK: ; Function Attrs:{{.*}}sanitize_memtag
+pub fn tagged() {}
+
+// CHECK: attributes #0 = {{.*}}sanitize_memtag