[MD settings] moving attached() code
[chromium-blink-merge.git] / tools / clang / plugins / tests / enum_last_value.cpp
blobc189f23ac2f4418a03c2b3c28feb46b3523a13f0
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // We warn when xxxLAST constants aren't last.
6 enum BadOne {
7 kBadOneInvalid = -1,
8 kBadOneRed,
9 kBadOneGreen,
10 kBadOneBlue,
11 kBadOneLast = kBadOneGreen
14 // We warn when xxx_LAST constants aren't last.
15 enum BadTwo {
16 BAD_TWO_INVALID,
17 BAD_TWO_RED,
18 BAD_TWO_GREEN,
19 BAD_TWO_BLUE = 0xfffffffc,
20 BAD_TWO_LAST = BAD_TWO_GREEN
23 // We don't warn when xxxLAST constants are last.
24 enum GoodOne {
25 kGoodOneInvalid = -1,
26 kGoodOneRed,
27 kGoodOneGreen,
28 kGoodOneBlue,
29 kGoodOneLast = kGoodOneBlue
32 // We don't warn when xxx_LAST constants are last.
33 enum GoodTwo {
34 GOOD_TWO_INVALID,
35 GOOD_TWO_RED,
36 GOOD_TWO_GREEN,
37 GOOD_TWO_BLUE = 0xfffffffc,
38 GOOD_TWO_LAST = GOOD_TWO_BLUE