Author: erichkeane
Date: 2025-07-07T06:59:37-07:00
New Revision: acb4fff866f95762b53560bcf7b3a3667e7a41fd

URL: 
https://github.com/llvm/llvm-project/commit/acb4fff866f95762b53560bcf7b3a3667e7a41fd
DIFF: 
https://github.com/llvm/llvm-project/commit/acb4fff866f95762b53560bcf7b3a3667e7a41fd.diff

LOG: [NFC] Fix GCC warning on enum/non-enum ternary thanks to 438863a0

On the above patch 
(https://github.com/llvm/llvm-project/commit/438863a09e2d907c36c4114228ef1eeee130e16b#commitcomment-161519239)

it was brought up that the commit 'caused' a GCC warning.  The Hueristic
for the GCC warning is a little strange, but the fix is easy enough, so
this patch should fix it by making sure both sides of the ternary are
the same type.

Added: 
    

Modified: 
    clang/include/clang/Sema/Scope.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Sema/Scope.h 
b/clang/include/clang/Sema/Scope.h
index 95f671c8387c2..757f3dcc3fe8d 100644
--- a/clang/include/clang/Sema/Scope.h
+++ b/clang/include/clang/Sema/Scope.h
@@ -298,7 +298,7 @@ class Scope {
   // is disallowed despite being a continue scope.
   void setIsConditionVarScope(bool InConditionVarScope) {
     Flags = (Flags & ~ConditionVarScope) |
-            (InConditionVarScope ? ConditionVarScope : 0);
+            (InConditionVarScope ? ConditionVarScope : NoScope);
   }
 
   bool isConditionVarScope() const {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to