[clang] [Clang] Fix assertion when __block is used on global variables in C mode (PR #194856)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 29 09:22:02 PDT 2026
================
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s
+
+ at interface MyClass {
+ // expected-warning at -1 {{class 'MyClass' defined without specifying a base class}}
+ // expected-note at -2 {{add a super class to fix this problem}}
+ __block int _myIvar;
----------------
TPPPP72 wrote:
This test aims to avoid regressions similar to the reverted PR that corrupted Objective-C `__block` modifier behavior.Especially since such a test was indeed missing in the past.
https://github.com/llvm/llvm-project/pull/194856
More information about the cfe-commits
mailing list