https://github.com/Disservin updated 
https://github.com/llvm/llvm-project/pull/207085

>From 1cb08e4356ce6da532062d3a859e48a7089c4b5a Mon Sep 17 00:00:00 2001
From: Disservin <[email protected]>
Date: Wed, 1 Jul 2026 23:11:29 +0200
Subject: [PATCH 1/2] [clang] Fix enum/non-enum conditional warning in
 ParseStmt

Use Scope::NoScope instead of 0
---
 clang/lib/Parse/ParseStmt.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 37f142e059930..17886bffec853 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -1741,7 +1741,7 @@ StmtResult Parser::ParseWhileStatement(SourceLocation 
*TrailingElseLoc,
   // while, for, and switch statements are local to the if, while, for, or
   // switch statement (including the controlled statement).
   //
-  unsigned ScopeFlags = Scope::ControlScope | (C99orCXX ? Scope::DeclScope : 
0);
+  unsigned ScopeFlags = Scope::ControlScope | (C99orCXX ? Scope::DeclScope : 
Scope::NoScope);
   ParseScope WhileScope(this, ScopeFlags);
 
   // Parse the condition.

>From 7857e39f36560b51d01b37bba8ec00962af28ccd Mon Sep 17 00:00:00 2001
From: Disservin <[email protected]>
Date: Thu, 2 Jul 2026 07:55:05 +0200
Subject: [PATCH 2/2] fix format

---
 clang/lib/Parse/ParseStmt.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 17886bffec853..f9c7d0988b403 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -1741,7 +1741,8 @@ StmtResult Parser::ParseWhileStatement(SourceLocation 
*TrailingElseLoc,
   // while, for, and switch statements are local to the if, while, for, or
   // switch statement (including the controlled statement).
   //
-  unsigned ScopeFlags = Scope::ControlScope | (C99orCXX ? Scope::DeclScope : 
Scope::NoScope);
+  unsigned ScopeFlags =
+      Scope::ControlScope | (C99orCXX ? Scope::DeclScope : Scope::NoScope);
   ParseScope WhileScope(this, ScopeFlags);
 
   // Parse the condition.

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to