================
@@ -169,14 +169,14 @@ def note_constexpr_this : Note<
 def access_kind : TextSubstitution<
   "%select{read of|read of|assignment to|increment of|decrement of|"
   "member call on|dynamic_cast of|typeid applied to|construction of|"
-  "destruction of}0">;
+  "destruction of|read of}0">;
 def access_kind_subobject : TextSubstitution<
   "%select{read of|read of|assignment to|increment of|decrement of|"
   "member call on|dynamic_cast of|typeid applied to|"
-  "construction of subobject of|destruction of}0">;
+  "construction of subobject of|destruction of|read of}0">;
----------------
MitalAshok wrote:

This is for the messages shown in places like this:

```c++
constexpr struct { mutable int i } s;
static_assert(__builtin_is_within_lifetime(&s.i));
// read of mutable member 'i' is not allowed in a constant expression
```

This is the same message as `AK_Read` and `AK_ReadObjectRepresentation` because 
`is_within_lifetime` has basically the same restrictions as reading the value 
of an object (you "read" the value just to check if it is in lifetime).

Open to other suggestions to make it more clear

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

Reply via email to