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 | 6b21696ee810ad50da5a387c627a39fbeefb3168 (patch) | |
tree | d0353aa79d964b46a42befa3279fc613717ee120 /clang/test/SemaCXX/cxx0x-initializer-constructor.cpp | |
parent | 86b1d868ba5a66e816771473878b83b519b1608f (diff) | |
download | bcm5719-llvm-6b21696ee810ad50da5a387c627a39fbeefb3168.tar.gz bcm5719-llvm-6b21696ee810ad50da5a387c627a39fbeefb3168.zip |
Add some missing diagnostics for C++11 narrowing conversions.
llvm-svn: 174337
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-initializer-constructor.cpp')
-rw-r--r-- | clang/test/SemaCXX/cxx0x-initializer-constructor.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp index 45ec0cbfdda..dc179f81bd3 100644 --- a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp +++ b/clang/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}; } |