[PATCH] D56522: [SemaCXX] add -Woverride-init alias to -Winitializer-overrides
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 10 11:18:28 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350877: [SemaCXX] add -Woverride-init alias to -Winitializer-overrides (authored by nickdesaulniers, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56522/new/
https://reviews.llvm.org/D56522
Files:
cfe/trunk/docs/DiagnosticsReference.rst
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/test/SemaCXX/designated-initializers.cpp
Index: cfe/trunk/docs/DiagnosticsReference.rst
===================================================================
--- cfe/trunk/docs/DiagnosticsReference.rst
+++ cfe/trunk/docs/DiagnosticsReference.rst
@@ -7885,6 +7885,10 @@
| |+---------------------+|
+-----------------------------------------------------------------------------------------------+-----------------------+
+-Woverride-init
+--------------
+Synonym for `-Winitializer-overrides`_.
+
-Woverride-module
-----------------
Index: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
===================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td
@@ -365,6 +365,8 @@
def NullCharacter : DiagGroup<"null-character">;
def NullDereference : DiagGroup<"null-dereference">;
def InitializerOverrides : DiagGroup<"initializer-overrides">;
+// For compatibility with GCC; -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: cfe/trunk/test/SemaCXX/designated-initializers.cpp
===================================================================
--- cfe/trunk/test/SemaCXX/designated-initializers.cpp
+++ cfe/trunk/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 {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56522.181113.patch
Type: text/x-patch
Size: 1758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190110/15253813/attachment.bin>
More information about the cfe-commits
mailing list