// 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.
void
// Test each rule individually.
;
;
Convert<T> ;
// C++0x [dcl.init.list]p7: A narrowing conversion is an implicit conversion
//
// * from a floating-point type to an integer type, or
void
// * from long double to double or float, or from double to float, except where
// the source is a constant expression and the actual value after conversion
// is within the range of values that can be represented (even if it cannot be
// represented exactly), or
void
// * from an integer type or unscoped enumeration type to a floating-point type,
// except where the source is a constant expression and the actual value after
// conversion will fit into the target type and will produce the original
// value when converted back to the original type, or
void
// * from an integer type or unscoped enumeration type to an integer type that
// cannot represent all the values of the original type, except where the
// source is a constant expression and the actual value after conversion will
// fit into the target type and will produce the original value when converted
// back to the original type.
void
// Be sure that type- and value-dependent expressions in templates get the warning
// too.
void
void
// We don't want qualifiers on the types in the diagnostic.
void
// Make sure we still get the right SFINAE behavior.
;
int &;
float &;
void