Fix codegen for initialization of global atomics
authorAaron Ballman <aaron@aaronballman.com>
Tue, 25 Apr 2023 15:29:22 +0000 (11:29 -0400)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 25 Apr 2023 15:37:06 +0000 (11:37 -0400)
commit1395cde24b3641e284bb1daae7d56c189a2635e3
tree7abc15bb7326f327acb12e1fde4f5fb1e02ebc93
parent65d71ee3cfa754fe622477a4ac57476cbce9e149
Fix codegen for initialization of global atomics

This amends 2e275e24355cb224981f9beb2b026a3169fc7232. That commit added
a null to pointer cast kind when determining whether the expression can
be a valid constant initializer, but failed to update the constant
expression evaluator to perform the evaluation. This commit updates the
constant expression evaluator to handle that cast kind.
clang/lib/AST/ExprConstant.cpp
clang/test/CodeGen/atomic.c