Skip to content

Commit b03f929

Browse files
authored
Revert manual changes to src/prebuilt/lexer-keywords.cc. NFC (#2412)
This file is auto-generated but I had manually edited it #2091. Instead, disabled the clang fallthrough warnings when including this file.
1 parent 356931a commit b03f929

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

src/prebuilt/lexer-keywords.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,55 +96,55 @@ Perfect_Hash::hash (const char *str, size_t len)
9696
{
9797
default:
9898
hval += asso_values[static_cast<unsigned char>(str[26])];
99-
[[fallthrough]];
99+
/*FALLTHROUGH*/
100100
case 26:
101101
case 25:
102102
case 24:
103103
case 23:
104104
hval += asso_values[static_cast<unsigned char>(str[22])];
105-
[[fallthrough]];
105+
/*FALLTHROUGH*/
106106
case 22:
107107
case 21:
108108
case 20:
109109
case 19:
110110
hval += asso_values[static_cast<unsigned char>(str[18])];
111-
[[fallthrough]];
111+
/*FALLTHROUGH*/
112112
case 18:
113113
hval += asso_values[static_cast<unsigned char>(str[17])];
114-
[[fallthrough]];
114+
/*FALLTHROUGH*/
115115
case 17:
116116
hval += asso_values[static_cast<unsigned char>(str[16])];
117-
[[fallthrough]];
117+
/*FALLTHROUGH*/
118118
case 16:
119119
case 15:
120120
hval += asso_values[static_cast<unsigned char>(str[14])];
121-
[[fallthrough]];
121+
/*FALLTHROUGH*/
122122
case 14:
123123
case 13:
124124
case 12:
125125
hval += asso_values[static_cast<unsigned char>(str[11])];
126-
[[fallthrough]];
126+
/*FALLTHROUGH*/
127127
case 11:
128128
case 10:
129129
hval += asso_values[static_cast<unsigned char>(str[9])];
130-
[[fallthrough]];
130+
/*FALLTHROUGH*/
131131
case 9:
132132
case 8:
133133
hval += asso_values[static_cast<unsigned char>(str[7])];
134-
[[fallthrough]];
134+
/*FALLTHROUGH*/
135135
case 7:
136136
hval += asso_values[static_cast<unsigned char>(str[6])];
137-
[[fallthrough]];
137+
/*FALLTHROUGH*/
138138
case 6:
139139
hval += asso_values[static_cast<unsigned char>(str[5])];
140-
[[fallthrough]];
140+
/*FALLTHROUGH*/
141141
case 5:
142142
hval += asso_values[static_cast<unsigned char>(str[4])];
143-
[[fallthrough]];
143+
/*FALLTHROUGH*/
144144
case 4:
145145
case 3:
146146
hval += asso_values[static_cast<unsigned char>(str[2]+1)];
147-
[[fallthrough]];
147+
/*FALLTHROUGH*/
148148
case 2:
149149
case 1:
150150
hval += asso_values[static_cast<unsigned char>(str[0]+1)];

src/wast-lexer.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ namespace wabt {
2929

3030
namespace {
3131

32+
#if __clang__
33+
#pragma clang diagnostic push
34+
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
35+
#endif
3236
#include "prebuilt/lexer-keywords.cc"
37+
#if __clang__
38+
#pragma clang diagnostic pop
39+
#endif
3340

3441
} // namespace
3542

0 commit comments

Comments
 (0)