[llvm] Add back fallthrough annotations removed by 7f3afab (PR #148032)
Jorge Gorbe Moya via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 10 12:58:18 PDT 2025
slackito wrote:
The [LLVM Coding Standards doc](https://llvm.org/docs/CodingStandards.html#c-standard-versions) says
> Unless otherwise documented, LLVM subprojects are written using standard C++17 code and avoid unnecessary vendor-specific extensions.
>
> Nevertheless, we restrict ourselves to features which are available in the major toolchains supported as host compilers (see [Getting Started with the LLVM System](https://llvm.org/docs/GettingStarted.html) page, section Software).
And that Software section in the Getting Started document says:
> LLVM is written using the subset of C++ documented in [coding standards](https://llvm.org/docs/CodingStandards.html). To enforce this language version, we check the most popular host toolchains for specific minimum versions in our build systems:
>
> * Clang 5.0
> * Apple Clang 10.0
> * GCC 7.4
> * Visual Studio 2019 16.8
According to https://en.cppreference.com/w/cpp/compiler_support/17, `[[fallthrough]]` is supported by GCC 7, Clang 3.9, VS 2017 15.0 and Apple Clang. So I'd say yes we can. But that's way out of scope for this PR.
https://github.com/llvm/llvm-project/pull/148032
More information about the llvm-commits
mailing list