Skip to content

Commit b4cdf0b

Browse files
Apply Reviews
1 parent 704b496 commit b4cdf0b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

clang/include/clang/CIR/MissingFeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ struct MissingFeatures {
153153
static bool coroEndBuiltinCall() { return false; }
154154
static bool coroutineFrame() { return false; }
155155
static bool emitBodyAndFallthrough() { return false; }
156+
static bool coroOutsideFrameMD() { return false; }
156157

157158
// Various handling of deferred processing in CIRGenModule.
158159
static bool cgmRelease() { return false; }

clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct GetParamRef : public StmtVisitor<GetParamRef> {
4848
expr = e;
4949
}
5050
void VisitStmt(Stmt *s) {
51-
for (auto *c : s->children()) {
51+
for (Stmt *c : s->children()) {
5252
if (c)
5353
Visit(c);
5454
}
@@ -65,12 +65,12 @@ struct ParamReferenceReplacerRAII {
6565
ParamReferenceReplacerRAII(CIRGenFunction::DeclMapTy &localDeclMap)
6666
: localDeclMap(localDeclMap) {}
6767

68-
void addCopy(DeclStmt const *pm) {
68+
void addCopy(const DeclStmt *pm) {
6969
// Figure out what param it refers to.
7070

7171
assert(pm->isSingleDecl());
72-
VarDecl const *vd = static_cast<VarDecl const *>(pm->getSingleDecl());
73-
Expr const *initExpr = vd->getInit();
72+
const VarDecl *vd = static_cast<const VarDecl *>(pm->getSingleDecl());
73+
const Expr *initExpr = vd->getInit();
7474
GetParamRef visitor;
7575
visitor.Visit(const_cast<Expr *>(initExpr));
7676
assert(visitor.expr);
@@ -224,6 +224,7 @@ CIRGenFunction::emitCoroutineBody(const CoroutineBodyStmt &s) {
224224
// Create parameter copies. We do it before creating a promise, since an
225225
// evolution of coroutine TS may allow promise constructor to observe
226226
// parameter copies.
227+
assert(!cir::MissingFeatures::coroOutsideFrameMD());
227228
for (auto *pm : paramMoves) {
228229
if (emitStmt(pm, /*useCurrentScope=*/true).failed())
229230
return mlir::failure();

0 commit comments

Comments
 (0)