diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-05 05:52:24 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-02-05 05:52:24 +0000 |
commit | a4dc51b46861eb52626f89183da7610437baba93 (patch) | |
tree | d739e9b53f7280857759856b8d0388059a183ed3 /test/SemaCXX/cxx0x-initializer-constructor.cpp | |
parent | 152ea0e4711f7aed75f6a1d1995b0bd94eb31c98 (diff) |
Add some missing diagnostics for C++11 narrowing conversions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174337 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx0x-initializer-constructor.cpp')
-rw-r--r-- | test/SemaCXX/cxx0x-initializer-constructor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/SemaCXX/cxx0x-initializer-constructor.cpp b/test/SemaCXX/cxx0x-initializer-constructor.cpp index 45ec0cbfdd..dc179f81bd 100644 --- a/test/SemaCXX/cxx0x-initializer-constructor.cpp +++ b/test/SemaCXX/cxx0x-initializer-constructor.cpp @@ -75,9 +75,8 @@ namespace objects { { F<0> f = {}; } // Narrowing conversions don't affect viability. The next two choose // the initializer_list constructor. - // FIXME: Emit narrowing conversion errors. - { F<3> f{1, 1.0}; } // xpected-error {{narrowing conversion}} - { F<3> f = {1, 1.0}; } // xpected-error {{narrowing conversion}} + { F<3> f{1, 1.0}; } // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}} + { F<3> f = {1, 1.0}; } // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}} { F<3> f{1, 2, 3, 4, 5, 6, 7, 8}; } { F<3> f = {1, 2, 3, 4, 5, 6, 7, 8}; } { F<3> f{1, 2, 3, 4, 5, 6, 7, 8}; } |