Skip to content

Commit acb4fff

Browse files
committed
[NFC] Fix GCC warning on enum/non-enum ternary thanks to 438863a
On the above patch (438863a#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.
1 parent 1a1a11f commit acb4fff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/include/clang/Sema/Scope.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ class Scope {
298298
// is disallowed despite being a continue scope.
299299
void setIsConditionVarScope(bool InConditionVarScope) {
300300
Flags = (Flags & ~ConditionVarScope) |
301-
(InConditionVarScope ? ConditionVarScope : 0);
301+
(InConditionVarScope ? ConditionVarScope : NoScope);
302302
}
303303

304304
bool isConditionVarScope() const {

0 commit comments

Comments
 (0)