[clang] [CIR] Handle NullStmt (PR #134889)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 8 10:46:17 PDT 2025
================
@@ -90,3 +90,18 @@ int f3(void) {
// OGCG-NEXT: store i32 3, ptr %[[I_PTR]], align 4
// OGCG-NEXT: %[[I:.*]] = load i32, ptr %[[I_PTR]], align 4
// OGCG-NEXT: ret i32 %[[I]]
+
+// Verify null statement handling.
+void f4(void) {
+ ;
----------------
andykaylor wrote:
There is already a [test that does `for (;;) {}`](https://github.com/llvm/llvm-project/blob/4ab86edb560a2e1152e22700b0cb386759286c37/clang/test/CIR/CodeGen/loop.cpp#L8) and the semicolons in the `for` statement don't go through NullStmt. I was just trying to keep this focused.
https://github.com/llvm/llvm-project/pull/134889
More information about the cfe-commits
mailing list