Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: tools/clang/plugins/tests/enum_last_value.cpp

Issue 213403010: Re-enable the clang check for enum constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright line. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 // We warn when xxxLAST constants aren't last.
6 enum BadOne {
7 kBadOneInvalid = -1,
8 kBadOneRed,
9 kBadOneGreen,
10 kBadOneBlue,
11 kBadOneLast = kBadOneGreen
12 };
13
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
21 };
22
23 // We dont warn when xxxLAST constants are last.
24 enum GoodOne {
25 kGoodOneInvalid = -1,
26 kGoodOneRed,
27 kGoodOneGreen,
28 kGoodOneBlue,
29 kGoodOneLast = kGoodOneBlue
30 };
31
32 // We dont 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
39 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698