From 3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 Mon Sep 17 00:00:00 2001 From: dim Date: Wed, 27 May 2015 18:47:56 +0000 Subject: Vendor import of clang trunk r238337: https://llvm.org/svn/llvm-project/cfe/trunk@238337 --- test/SemaCXX/cxx0x-initializer-scalars.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/SemaCXX/cxx0x-initializer-scalars.cpp') diff --git a/test/SemaCXX/cxx0x-initializer-scalars.cpp b/test/SemaCXX/cxx0x-initializer-scalars.cpp index 1475dcf..c9d5ffd 100644 --- a/test/SemaCXX/cxx0x-initializer-scalars.cpp +++ b/test/SemaCXX/cxx0x-initializer-scalars.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s -pedantic-errors struct one { char c[1]; }; struct two { char c[2]; }; @@ -55,7 +55,7 @@ namespace integral { int ar[10]; (void) ar[{1}]; // expected-error {{array subscript is not an integer}} - return {1}; + return {1}; // expected-warning {{braces around scalar init}} } void inline_init() { @@ -70,15 +70,15 @@ namespace integral { void function_call() { void takes_int(int); - takes_int({1}); + takes_int({1}); // expected-warning {{braces around scalar init}} } void overloaded_call() { one overloaded(int); two overloaded(double); - static_assert(sizeof(overloaded({0})) == sizeof(one), "bad overload"); - static_assert(sizeof(overloaded({0.0})) == sizeof(two), "bad overload"); + static_assert(sizeof(overloaded({0})) == sizeof(one), "bad overload"); // expected-warning {{braces around scalar init}} + static_assert(sizeof(overloaded({0.0})) == sizeof(two), "bad overload"); // expected-warning {{braces around scalar init}} void ambiguous(int, double); // expected-note {{candidate}} void ambiguous(double, int); // expected-note {{candidate}} -- cgit v1.1