[all-commits] [llvm/llvm-project] 00f9ef: [C] Modify -Wdefault-const-init (#137961)
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Thu May 1 04:08:27 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 00f9ef282c7482754a0fea497417604d1deca9fa
https://github.com/llvm/llvm-project/commit/00f9ef282c7482754a0fea497417604d1deca9fa
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2025-05-01 (Thu, 01 May 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/DiagnosticGroups.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/Sema.cpp
M clang/lib/Sema/SemaDecl.cpp
M clang/lib/Sema/SemaInit.cpp
M clang/test/Sema/warn-default-const-init.c
Log Message:
-----------
[C] Modify -Wdefault-const-init (#137961)
Post-commit review feedback on
https://github.com/llvm/llvm-project/pull/137166 raised a concern from
the Linux kernel about wanting to silence the new diagnostic when the
uninitialized object is a const member of a structure. These members can
be initialized later if the containing object is non-const, such as
through a call to memset, for example.
This splits the diagnostic groups into:
```
-Wc++-compat
-Wdefault-const-init
-Wdefault-const-init-field
-Wdefault-const-init-var
-Wdefault-const-init-unsafe
-Wdefault-const-init-field-unsafe
-Wdefault-const-init-var-unsafe
```
---------
Co-authored-by: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list