================
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 %s -O1 -emit-llvm -fextend-lifetimes -fsanitize=null 
-fsanitize-trap=null -o - | FileCheck --check-prefix TRAP %s
+// RUN: %clang_cc1 %s -O1 -emit-llvm -fextend-lifetimes -o - | FileCheck 
--check-prefix FAKEUSE %s
+
+// With -fextend-lifetimes the compiler generated a fake.use of a
+// reference variable at the end of the function, in the cleanup block. This 
prompted the 
+// address sanitizer to verify that the variable has been allocated properly, 
even when 
+// the function returns early.
+// We check that sanitizers are disabled for code generated for the benefit of 
fake.use 
+// intrinsics, as well as that the fake.use is no longer generated in the 
cleanup block.
+// It should be generated in the block preceding the cleanup block instead.
----------------
jmorse wrote:

Despite the filename containing "sanitizer", this test doesn't actually test 
sanitizer behaviour?

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

Reply via email to