[CodeGen] Correctly model std::byte's aliasing properties
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 25 Jul 2017 23:33:58 +0000 (23:33 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 25 Jul 2017 23:33:58 +0000 (23:33 +0000)
commit8f94a2350538f7fa7504f2f963760230dd197cab
tree91af9f94a6a42f18fedfe34e169254a54ced585b
parentbe66271f04c8a2c7911a549bfd961a47a8d5e12d
[CodeGen] Correctly model std::byte's aliasing properties

std::byte, when defined as an enum, needs to be given special treatment
with regards to its aliasing properties. An array of std::byte is
allowed to be used as storage for other types.

This fixes PR33916.

Differential Revision: https://reviews.llvm.org/D35824

llvm-svn: 309058
clang/include/clang/AST/Type.h
clang/lib/AST/Type.cpp
clang/lib/CodeGen/CodeGenTBAA.cpp
clang/test/CodeGenCXX/std-byte.cpp [new file with mode: 0644]