summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/binary-reader-objdump.cc1
-rw-r--r--src/binary-reader.cc2
-rw-r--r--src/error-formatter.cc2
-rw-r--r--src/prebuilt/lexer-keywords.cc26
4 files changed, 16 insertions, 15 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index 23f2016f..905647f4 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -691,6 +691,7 @@ void BinaryReaderObjdumpDisassemble::LogOpcode(const char* fmt, ...) {
case Opcode::Catch:
case Opcode::CatchAll:
indent_level--;
+ break;
default:
break;
}
diff --git a/src/binary-reader.cc b/src/binary-reader.cc
index 0c399461..0e0b894a 100644
--- a/src/binary-reader.cc
+++ b/src/binary-reader.cc
@@ -1719,7 +1719,7 @@ Result BinaryReader::ReadInstructions(bool stop_on_end,
case Opcode::DataDrop:
ERROR_IF(data_count_ == kInvalidIndex,
"data.drop requires data count section");
- // Fallthrough.
+ [[fallthrough]];
case Opcode::ElemDrop: {
Index segment;
CHECK_RESULT(ReadIndex(&segment, "segment index"));
diff --git a/src/error-formatter.cc b/src/error-formatter.cc
index 5b0d4952..9a14cfac 100644
--- a/src/error-formatter.cc
+++ b/src/error-formatter.cc
@@ -94,7 +94,7 @@ std::string FormatErrorsToString(const Errors& errors,
break;
case PrintHeader::Once:
print_header = PrintHeader::Never;
- // Fallthrough.
+ [[fallthrough]];
case PrintHeader::Always:
result += header;
result += ":\n";
diff --git a/src/prebuilt/lexer-keywords.cc b/src/prebuilt/lexer-keywords.cc
index bb7152fc..4a7da0e0 100644
--- a/src/prebuilt/lexer-keywords.cc
+++ b/src/prebuilt/lexer-keywords.cc
@@ -96,55 +96,55 @@ Perfect_Hash::hash (const char *str, size_t len)
{
default:
hval += asso_values[static_cast<unsigned char>(str[26])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 26:
case 25:
case 24:
case 23:
hval += asso_values[static_cast<unsigned char>(str[22])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 22:
case 21:
case 20:
case 19:
hval += asso_values[static_cast<unsigned char>(str[18])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 18:
hval += asso_values[static_cast<unsigned char>(str[17])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 17:
hval += asso_values[static_cast<unsigned char>(str[16])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 16:
case 15:
hval += asso_values[static_cast<unsigned char>(str[14])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 14:
case 13:
case 12:
hval += asso_values[static_cast<unsigned char>(str[11])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 11:
case 10:
hval += asso_values[static_cast<unsigned char>(str[9])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 9:
case 8:
hval += asso_values[static_cast<unsigned char>(str[7])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 7:
hval += asso_values[static_cast<unsigned char>(str[6])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 6:
hval += asso_values[static_cast<unsigned char>(str[5])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 5:
hval += asso_values[static_cast<unsigned char>(str[4])];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 4:
case 3:
hval += asso_values[static_cast<unsigned char>(str[2]+1)];
- /*FALLTHROUGH*/
+ [[fallthrough]];
case 2:
case 1:
hval += asso_values[static_cast<unsigned char>(str[0]+1)];