[PATCH] D35824: [Sema] Implicitly apply the may_alias attribute to std::byte

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 16:24:42 PDT 2017


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

LGTM with a tweaked comment. Thanks!



================
Comment at: lib/CodeGen/CodeGenTBAA.cpp:88-90
+  // C++1z [intro.object]p3: If a complete object is created in storage
+  // associated with another object e of type [...] "array of N std::byte", that
+  // array provides storage for the created object [...].
----------------
[basic.lval]p10: "If a program attempts to access the stored value of an object through a glvalue of other than one of the following types the behavior is undefined: [...] a char, unsigned char, or std::byte type."

... is the relevant quotation for the purpose of aliasing.


https://reviews.llvm.org/D35824





More information about the cfe-commits mailing list