]> granicus.if.org Git - clang/commit
CodeGen: Correctly initialize bitfields with non-constant initializers
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 14 Mar 2015 22:24:38 +0000 (22:24 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 14 Mar 2015 22:24:38 +0000 (22:24 +0000)
commit2f3ac362ade846532568c164bafcfb1924c78700
tree16ef9db18404d757e02b94b21e3b1e1801293a61
parentc926970ff01aa4cc1dc1e80a390ca3e93e9fbb72
CodeGen: Correctly initialize bitfields with non-constant initializers

It is possible to construct an initializer for a bitfield which is not
constant.  Instead of emitting code to initialize the field before the
execution of main, clang would crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232285 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExprConstant.cpp
test/CodeGenCXX/const-init.cpp