[clang] [clang-tools-extra] [Clang] Add support for the C `defer` TS (PR #162848)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 4 01:01:33 PST 2025
================
@@ -3232,6 +3243,46 @@ class ReturnStmt final
}
};
+/// DeferStmt - This represents a deferred statement.
+class DeferStmt : public Stmt {
+ friend class ASTStmtReader;
+
+ /// The deferred statement.
+ Stmt *Body;
+
+public:
+ DeferStmt(SourceLocation DeferLoc, Stmt *Body) : Stmt(DeferStmtClass) {
+ setDeferLoc(DeferLoc);
+ setBody(Body);
+ }
+
+ explicit DeferStmt(EmptyShell Empty) : Stmt(DeferStmtClass, Empty) {}
----------------
cor3ntin wrote:
I would prefer it too - that also let us have a distinct CreateEmpty
https://github.com/llvm/llvm-project/pull/162848
More information about the cfe-commits
mailing list