[clang] [clang][bytecode] Support compile-time exceptions (PR #189410)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 4 07:56:47 PDT 2026
================
@@ -60,6 +60,30 @@ static bool exceedsArraySizeLimit(const LangOptions &LangOpts,
return Limit != 0 && NumElems > Limit;
}
+[[maybe_unused]] static bool blockEndsInReturn(const Stmt *S) {
+ if (isa<ReturnStmt>(S))
+ return true;
+
+ if (const auto *CS = dyn_cast<CompoundStmt>(S); CS && !CS->body_empty())
+ return isa<ReturnStmt>(CS->body_back());
+
+ return false;
+}
+
+const CXXConstructorDecl *findCopyCtor(const CXXRecordDecl *RD,
----------------
zwuis wrote:
```suggestion
static const CXXConstructorDecl *findCopyCtor(const CXXRecordDecl *RD,
```
https://github.com/llvm/llvm-project/pull/189410
More information about the cfe-commits
mailing list