r350877 - [SemaCXX] add -Woverride-init alias to -Winitializer-overrides
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 10 11:12:39 PST 2019
Author: nickdesaulniers
Date: Thu Jan 10 11:12:39 2019
New Revision: 350877
URL: http://llvm.org/viewvc/llvm-project?rev=350877&view=rev
Log:
[SemaCXX] add -Woverride-init alias to -Winitializer-overrides
Summary:
https://bugs.llvm.org/show_bug.cgi?id=40251
https://github.com/ClangBuiltLinux/linux/issues/307
Reviewers: rsmith
Reviewed By: rsmith
Subscribers: cfe-commits, nathanchance, srhines
Differential Revision: https://reviews.llvm.org/D56522
Modified:
cfe/trunk/docs/DiagnosticsReference.rst
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/test/SemaCXX/designated-initializers.cpp
Modified: cfe/trunk/docs/DiagnosticsReference.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/DiagnosticsReference.rst?rev=350877&r1=350876&r2=350877&view=diff
==============================================================================
--- cfe/trunk/docs/DiagnosticsReference.rst (original)
+++ cfe/trunk/docs/DiagnosticsReference.rst Thu Jan 10 11:12:39 2019
@@ -7885,6 +7885,10 @@ This diagnostic is enabled by default.
| |+---------------------+|
+-----------------------------------------------------------------------------------------------+-----------------------+
+-Woverride-init
+--------------
+Synonym for `-Winitializer-overrides`_.
+
-Woverride-module
-----------------
Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=350877&r1=350876&r2=350877&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Thu Jan 10 11:12:39 2019
@@ -365,6 +365,8 @@ def NullArithmetic : DiagGroup<"null-ari
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]>;
Modified: cfe/trunk/test/SemaCXX/designated-initializers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/designated-initializers.cpp?rev=350877&r1=350876&r2=350877&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/designated-initializers.cpp (original)
+++ cfe/trunk/test/SemaCXX/designated-initializers.cpp Thu Jan 10 11:12:39 2019
@@ -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 {
More information about the cfe-commits
mailing list