Skip to content

Commit 7d450e8

Browse files
AaronBallmanIanWood1
authored andcommitted
Rename -Wjump-bypasses-init to -Wjump-misses-init
This matches the GCC diagnostic name which covers the same functionality.
1 parent e06b156 commit 7d450e8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ C Language Changes
205205
``-Wunterminated-string-initialization``. However, this diagnostic is not
206206
silenced by the ``nonstring`` attribute as these initializations are always
207207
incompatible with C++.
208-
- Added ``-Wjump-bypasses-init``, which is off by default and grouped under
208+
- Added ``-Wjump-misses-init``, which is off by default and grouped under
209209
``-Wc++-compat``. It diagnoses when a jump (``goto`` to its label, ``switch``
210210
to its ``case``) will bypass the initialization of a local variable, which is
211211
invalid in C++.

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def DefaultConstInit : DiagGroup<"default-const-init",
177177
def ImplicitVoidPtrCast : DiagGroup<"implicit-void-ptr-cast">;
178178
def ImplicitIntToEnumCast : DiagGroup<"implicit-int-enum-cast",
179179
[ImplicitEnumEnumCast]>;
180-
def JumpBypassesInit : DiagGroup<"jump-bypasses-init">;
180+
def JumpBypassesInit : DiagGroup<"jump-misses-init">;
181181
def TentativeDefnCompat : DiagGroup<"tentative-definition-compat">;
182182
def CXXCompat: DiagGroup<"c++-compat", [ImplicitVoidPtrCast, DefaultConstInit,
183183
ImplicitIntToEnumCast, HiddenCppDecl,

clang/test/Sema/warn-jump-bypasses-init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wjump-bypasses-init %s
1+
// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wjump-misses-init %s
22
// RUN: %clang_cc1 -fsyntax-only -verify=c,both -Wc++-compat %s
33
// RUN: %clang_cc1 -fsyntax-only -verify=good %s
44
// RUN: %clang_cc1 -fsyntax-only -verify=cxx,both -x c++ %s

0 commit comments

Comments
 (0)