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

Side by Side Diff: tools/clang/plugins/tests/enum_last_value_from_c.c

Issue 1385193002: Bisect clang Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 246985 Created 5 years, 2 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
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 don't handle this case when called from C due to sign mismatch issues.
15 // No matter; we're not looking for this issue outside of C++.
16 enum FailOne {
17 FAIL_ONE_INVALID,
18 FAIL_ONE_RED,
19 FAIL_ONE_GREEN,
20 FAIL_ONE_BLUE = 0xfffffffc,
21 FAIL_ONE_LAST = FAIL_ONE_GREEN
22 };
23
24 // We don't warn when xxxLAST constants are last.
25 enum GoodOne {
26 kGoodOneInvalid = -1,
27 kGoodOneRed,
28 kGoodOneGreen,
29 kGoodOneBlue,
30 kGoodOneLast = kGoodOneBlue
31 };
32
33 // We don't warn when xxx_LAST constants are last.
34 enum GoodTwo {
35 GOOD_TWO_INVALID,
36 GOOD_TWO_RED,
37 GOOD_TWO_GREEN,
38 GOOD_TWO_BLUE = 0xfffffffc,
39 GOOD_TWO_LAST = GOOD_TWO_BLUE
40 };
OLDNEW
« no previous file with comments | « tools/clang/plugins/tests/enum_last_value.txt ('k') | tools/clang/plugins/tests/enum_last_value_from_c.flags » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698