Skip to content

Commit dad7c26

Browse files
committed
[CS] Always set ErrorType for exprs in markInvalid
I don't recall why I made this conditional, let's just be consistent and always set ErrorType for invalid AST. This should only affect things like implicit nodes.
1 parent 9d9b4c9 commit dad7c26

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Sema/SyntacticElementTarget.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,7 @@ void SyntacticElementTarget::markInvalid() const {
302302
InvalidationWalker(ASTContext &ctx) : Ctx(ctx) {}
303303

304304
PreWalkResult<Expr *> walkToExprPre(Expr *E) override {
305-
if (!E->getType())
306-
E->setType(ErrorType::get(Ctx));
307-
305+
E->setType(ErrorType::get(Ctx));
308306
return Action::Continue(E);
309307
}
310308

0 commit comments

Comments
 (0)