[clang] [Clang] Fix assertion when __block is used on global variables in C mode (PR #183988)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 26 08:58:38 PDT 2026


TPPPP72 wrote:

> > @nico This wasn't an intentional change, but it seems my code modification has indeed caused some side effects. I suspect it might be because my check on `hasLocalStorage()` was too aggressive. I'll fix it as soon as I find the specific cause.
> 
> Ah, that was a screw up on my part when reviewing. This should have been if `VD && !VD->hasLocalStorage()`.
> 
> In addition to objc, we'll want to have test cases for instance and static fields in C and C++ records, and also possibly block and lambda captures of `__block` variables.

Oh, I didn't even notice I added an extra exclamation mark (・_・;)

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


More information about the cfe-commits mailing list