Add -Wnarrowing as an alias for -Wc++11-narrowing, for better GCC
compatibility. llvm-svn: 148702
This commit is contained in:
parent
84585ab48e
commit
c7ee2013d9
|
|
@ -72,8 +72,13 @@ def CXX98Compat : DiagGroup<"c++98-compat",
|
|||
def CXX98CompatPedantic : DiagGroup<"c++98-compat-pedantic", [CXX98Compat]>;
|
||||
|
||||
def CXX11Narrowing : DiagGroup<"c++11-narrowing">;
|
||||
|
||||
// Original name of this warning in Clang
|
||||
def : DiagGroup<"c++0x-narrowing", [CXX11Narrowing]>;
|
||||
|
||||
// Name of this warning in GCC
|
||||
def : DiagGroup<"narrowing", [CXX11Narrowing]>;
|
||||
|
||||
def CXX11Compat : DiagGroup<"c++11-compat", [CXX11Narrowing]>;
|
||||
def : DiagGroup<"c++0x-compat", [CXX11Compat]>;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wno-error=c++11-narrowing -triple x86_64-apple-macosx10.6.7 -verify %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -Wno-error=narrowing -triple x86_64-apple-macosx10.6.7 -verify %s
|
||||
|
||||
// Verify that narrowing conversions in initializer lists cause errors in C++0x
|
||||
// mode.
|
||||
|
|
|
|||
Loading…
Reference in New Issue