[PATCH] D13344: Keep the IfStmt node even if the condition is invalid
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 10 15:53:45 PDT 2015
rsmith added inline comments.
================
Comment at: lib/Sema/SemaStmt.cpp:505-506
@@ -512,1 +504,4 @@
+ } else {
+ ConditionExpr = new (Context) OpaqueValueExpr(SourceLocation(),
+ Context.VoidTy, VK_RValue);
}
----------------
Please add a comment here saying that we're creating this node for error recovery. Also, the type of the expression should be `BoolTy`, not `VoidTy`. Other than that, this looks fine to me.
http://reviews.llvm.org/D13344
More information about the cfe-commits
mailing list