[gn][banjo] Annotate some expected fallthrough with __FALLTHROUGH
This tells new enough compilers that all is well.
ZX-3415 #comment [gn][banjo] Annotate some expected fallthrough with __FALLTHROUGH
Test: CQ
Change-Id: I266303a51ce55ac318ff363f6ad3f4fe93baa588
diff --git a/zircon/system/host/banjo/lib/lexer.cpp b/zircon/system/host/banjo/lib/lexer.cpp
index 42cc9d2..859c6d5 100644
--- a/zircon/system/host/banjo/lib/lexer.cpp
+++ b/zircon/system/host/banjo/lib/lexer.cpp
@@ -7,6 +7,8 @@
#include <assert.h>
#include <ctype.h>
+#include <zircon/compiler.h>
+
namespace banjo {
namespace {
@@ -143,7 +145,7 @@
// This escaping logic is incorrect for the input: "\\"
if (last != '\\')
return Finish(Token::Kind::kStringLiteral);
- // Fall through.
+ __FALLTHROUGH;
default:
last = next;
}
@@ -224,7 +226,7 @@
Consume();
return Finish(Token::Kind::kArrow);
}
- // Fallthrough
+ __FALLTHROUGH;
case '0':
case '1':
case '2':