[clang] [clang][Sema] Fix ObjC file-scope literal diagnostic under -fobjc-arc (PR #209688)

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 27 21:52:47 PDT 2026


ahatanak wrote:

The changes look good.

Just one edge case: should we strip the parentheses too?

`static NSDictionary *const dValueBad = (@{@"a" : @(foo())})`

clang emits the generic `initializer element is not a compile-time constant` warning instead of pointing at the culprit `@(foo())`.

https://github.com/llvm/llvm-project/pull/209688


More information about the cfe-commits mailing list