================
@@ -107,48 +107,34 @@ TEST_F(CopyProfStateTest, CheckModeIgnoresStores) {
__copyprof_dtor_exit_callback(obj, sizeof(obj));
}
-// Tests that the `DTOR` context invariant covers every shadow write, not just
-// stores. A temporary object created inside a d'tor must leave shadow memory
-// alone too.
-TEST_F(CopyProfStateTest, CheckModeIgnoresConstruction) {
+// Unlike a c'tor, a copy assignment inside a d'tor overwrites an existing
+// object, so it must leave shadow memory alone, just like a store.
+TEST_F(CopyProfStateTest, CheckModeIgnoresCopyAssignment) {
char obj[32] = {0};
char other[32] = {0};
- char scratch[32] = {0};
+ char target[32] = {0};
----------------
newgre wrote:
done
https://github.com/llvm/llvm-project/pull/232851
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits