| // RUN: %check_clang_tidy %s bugprone-suspicious-enum-usage %t -- -config="{CheckOptions: [{key: bugprone-suspicious-enum-usage.StrictMode, value: 1}]}" -- |
| // CHECK-MESSAGES: :[[@LINE+2]]:1: warning: enum type seems like a bitmask (contains mostly power-of-2 literals) but a literal is not power-of-2 |
| // CHECK-MESSAGES: :76:7: note: used here as a bitmask |
| // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: enum type seems like a bitmask (contains mostly power-of-2 literals), but this literal is not a power-of-2 [bugprone-suspicious-enum-usage] |
| // CHECK-MESSAGES: :70:13: note: used here as a bitmask |
| // CHECK-MESSAGES: :[[@LINE+2]]:1: warning: enum type seems like a bitmask (contains mostly power-of-2 literals) but some literals are not power-of-2 |
| // CHECK-MESSAGES: :73:8: note: used here as a bitmask |
| // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: enum type seems like a bitmask (contains mostly power-of-2 literals), but this literal is not a power-of-2 |
| // CHECK-MESSAGES: :65:11: note: used here as a bitmask |
| // CHECK-MESSAGES: :[[@LINE-2]]:17: warning: enum values are from different enum types |
| // CHECK-MESSAGES: :[[@LINE-2]]:9: warning: enum values are from different enum types |
| int d = c | H, e = b * a; |
| if (Tuesday != Monday + 1 || |
| Friday - Thursday != 1 || |
| Sunday + Wednesday == (Sunday | Wednesday)) |