================
@@ -971,6 +971,35 @@ StmtResult Sema::ActOnIfStmt(SourceLocation IfLoc,
if (!ConstevalOrNegatedConsteval && !elseStmt)
DiagnoseEmptyStmtBody(RParenLoc, thenStmt, diag::warn_empty_if_body);
+ // Checks for if condition variable usage in else scope
+ if (elseStmt) {
----------------
arrowten wrote:
@erichkeane Please take look at the changes. Let me know if this can be
considered.
https://github.com/llvm/llvm-project/pull/156436
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits