[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
Mon Jul 24 22:18:44 PDT 2017


rsmith added a comment.

I would prefer to handle `std::byte` explicitly in the places where it matters, rather than adding an attribute to it and otherwise treating it like any other enumeration. We're going to want to be able to identify `std::byte` for warning emission and probably other codegen purposes too -- it's more a new fundamental type that happens to be defined in the library (like `std::nullptr_t`) than a type that just happens to be `mayalias`. Maybe a `Type::is[Std]Byte`, analogous to `Type::isAlignValT`?

As far as I can see, nowhere in Clang cares about `MayAliasAttr` on enums other than CodeGenTBAA.cpp.


https://reviews.llvm.org/D35824





More information about the cfe-commits mailing list