[clang] [Clang] Don't treat a declaration that declares nothing as an invalid statement (PR #224682)
Akash Manna via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 28 10:00:22 PDT 2026
================
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -std=gnu99 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=gnu99 -fsyntax-only -verify -fno-recovery-ast %s
+
+// A declaration that declares nothing made the enclosing statement expression
+// invalid without an error, so the void condition below was never diagnosed
+// and CodeGen crashed on it.
----------------
akash-manna-sky wrote:
Same bug, fixed by this PR: without the empty declaration the assertion fails as expected on trunk.
https://github.com/llvm/llvm-project/pull/224682
More information about the cfe-commits
mailing list