[PATCH] D56522: [SemaCXX] add -Woverride-init alias to -Winitializer-overrides

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 9 16:37:50 PST 2019


nickdesaulniers created this revision.
nickdesaulniers added a reviewer: rsmith.
Herald added a subscriber: cfe-commits.

https://bugs.llvm.org/show_bug.cgi?id=40251
https://github.com/ClangBuiltLinux/linux/issues/307


Repository:
  rC Clang

https://reviews.llvm.org/D56522

Files:
  docs/DiagnosticsReference.rst
  include/clang/Basic/DiagnosticGroups.td
  test/SemaCXX/designated-initializers.cpp


Index: test/SemaCXX/designated-initializers.cpp
===================================================================
--- test/SemaCXX/designated-initializers.cpp
+++ test/SemaCXX/designated-initializers.cpp
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Winitializer-overrides %s
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Woverride-init %s
 
 template <typename T> struct Foo {
   struct SubFoo {
Index: include/clang/Basic/DiagnosticGroups.td
===================================================================
--- include/clang/Basic/DiagnosticGroups.td
+++ include/clang/Basic/DiagnosticGroups.td
@@ -361,6 +361,8 @@
 def NullCharacter : DiagGroup<"null-character">;
 def NullDereference : DiagGroup<"null-dereference">;
 def InitializerOverrides : DiagGroup<"initializer-overrides">;
+// -Woverride-init = -Winitializer-overrides
+def : DiagGroup<"override-init", [InitializerOverrides]>;
 def NonNull : DiagGroup<"nonnull">;
 def NonPODVarargs : DiagGroup<"non-pod-varargs">;
 def ClassVarargs : DiagGroup<"class-varargs", [NonPODVarargs]>;
Index: docs/DiagnosticsReference.rst
===================================================================
--- docs/DiagnosticsReference.rst
+++ docs/DiagnosticsReference.rst
@@ -7885,6 +7885,10 @@
 |                                                                                               |+---------------------+|
 +-----------------------------------------------------------------------------------------------+-----------------------+
 
+-Woverride-init
+--------------
+Synonym for `-Winitializer-overrides`_.
+
 
 -Woverride-module
 -----------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56522.180962.patch
Type: text/x-patch
Size: 1640 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190110/32851625/attachment.bin>


More information about the cfe-commits mailing list