[clang] [Clang] Fix P2564 handling of variable initializers (PR #89565)
Daniel M. Katz via cfe-commits
cfe-commits at lists.llvm.org
Thu May 16 08:37:52 PDT 2024
katzdm wrote:
> @katzdm It seems after this a `warn_impcast_integer_precision_constant` warning went missing:
>
> https://godbolt.org/z/ndsPb44b4
>
> Is that expected?
We changed [this diagnostic](https://github.com/llvm/llvm-project/blob/5ac34358181b21135851979c1c949632be5a9d32/clang/lib/Sema/SemaChecking.cpp#L16532-L16535) from a "runtime behavior" to "any time" check, but not [this one](https://github.com/llvm/llvm-project/blob/5ac34358181b21135851979c1c949632be5a9d32/clang/lib/Sema/SemaChecking.cpp#L16486-L16490) - I'm guessing we don't have any tests to cover the later case.
Seems like we'd probably want to retain this warning, too - I'll throw a change together, see if it breaks any other tests, and see what reviewers have to say. Thanks for calling this out.
https://github.com/llvm/llvm-project/pull/89565
More information about the cfe-commits
mailing list