Skip to content

Commit 4b5511e

Browse files
committed
compiler: Add FALLTHROUGH_INTENDED to appropriate cases
The macro can become [[clang::fallthrough]] or similar on supporting compilers.
1 parent e109125 commit 4b5511e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/src/java_plugin/cpp/java_generator.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#define XSTR(s) STR(s)
1919
#endif
2020

21+
#ifndef FALLTHROUGH_INTENDED
22+
#define FALLTHROUGH_INTENDED
23+
#endif
24+
2125
namespace java_grpc_generator {
2226

2327
using google::protobuf::FileDescriptor;
@@ -488,13 +492,15 @@ static void PrintStub(
488492
break;
489493
case BLOCKING_CLIENT_INTERFACE:
490494
interface = true;
495+
FALLTHROUGH_INTENDED;
491496
case BLOCKING_CLIENT_IMPL:
492497
call_type = BLOCKING_CALL;
493498
stub_name += "BlockingStub";
494499
client_name += "BlockingClient";
495500
break;
496501
case FUTURE_CLIENT_INTERFACE:
497502
interface = true;
503+
FALLTHROUGH_INTENDED;
498504
case FUTURE_CLIENT_IMPL:
499505
call_type = FUTURE_CALL;
500506
stub_name += "FutureStub";

0 commit comments

Comments
 (0)