https://github.com/lb90 created https://github.com/llvm/llvm-project/pull/149474
See also https://github.com/llvm/llvm-project/issues/58375 >From 42a89816f517718d517bcbd5f9d1bd5f629ac4bb Mon Sep 17 00:00:00 2001 From: Luca Bacci <luca.bacci...@gmail.com> Date: Fri, 18 Jul 2025 10:22:22 +0200 Subject: [PATCH] [Clang] Add -Wimplicit-fallthrough to -Wextra for GCC compatibility --- clang/docs/ReleaseNotes.rst | 2 ++ clang/include/clang/Basic/DiagnosticGroups.td | 1 + 2 files changed, 3 insertions(+) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index ea16029268dba..f9b7240919785 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -716,6 +716,8 @@ Improvements to Clang's diagnostics Added a new warning in this group for the case where the attribute is missing/implicit on an override of a virtual method. +- ``-Wimplicit-fallthrough`` was added to ``-Wextra`` for GCC compatibility. + Improvements to Clang's time-trace ---------------------------------- diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td index ccb18aa37447e..6283c1ead791a 100644 --- a/clang/include/clang/Basic/DiagnosticGroups.td +++ b/clang/include/clang/Basic/DiagnosticGroups.td @@ -1231,6 +1231,7 @@ def Extra : DiagGroup<"extra", [ CastFunctionTypeMismatch, InitStringTooLongMissingNonString, WarnUnnecessaryVirtualSpecifier, + ImplicitFallthrough, ]>; def Most : DiagGroup<"most", [ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits