]> granicus.if.org Git - clang/commitdiff
Fix the expected error for narrowing conversions in generalized-initializers.cpp to
authorSebastian Redl <sebastian.redl@getdesigned.at>
Sat, 24 Sep 2011 17:48:06 +0000 (17:48 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Sat, 24 Sep 2011 17:48:06 +0000 (17:48 +0000)
match what the actual implementation of the error looks like.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140458 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/generalized-initializers.cpp

index 6e2bee7e301d153284c6d22adbe2a844c4b31d54..cf1b61e683c0cbe71c2dd2bd91387b9a0babc718 100644 (file)
@@ -47,8 +47,8 @@ namespace integral {
     { const int a = {1}; static_assert(a == 1, ""); }
     { const int a{1, 2}; } // expected-error {{excess elements}}
     { const int a = {1, 2}; } // expected-error {{excess elements}}
-    { const short a{100000}; } // expected-error {{narrowing conversion}}
-    { const short a = {100000}; } // expected-error {{narrowing conversion}}
+    { const short a{100000}; } // expected-error {{cannot be narrowed}}
+    { const short a = {100000}; } // expected-error {{cannot be narrowed}}
   }
 
   int function_call() {