This reverts commit r184100.
It was faling on some bots:
http://bb.pgr.jp/builders/cmake-clang-i686-mingw32/builds/1973/steps/test_clang/logs/Clang%20%3A%3A%20SemaCXX__cxx1y-contextual-conversion-tweaks.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184108
91177308-0d34-0410-b5e6-
96231b3b80d8
AA_Converting);
if (!isSFINAEContext())
- // Diagnose the compatibility of this conversion.
- Diag(StartLoc, diag::warn_cxx98_compat_array_size_conversion)
- << ArraySize->getType() << 0 << "'size_t'";
+ // Diagnose the compatibility of this conversion.
+ Diag(StartLoc, diag::warn_cxx98_compat_array_size_conversion)
+ << ArraySize->getType() << 0 << Context.getSizeType();
} else {
class SizeConvertDiagnoser : public ICEConvertDiagnoser {
protected:
//expected-error@143 {{cannot initialize object parameter of type 'extended_examples_cxx1y::D' with an expression of type 'extended_examples_cxx1y::D'}}
#endif
-namespace extended_examples_array_bounds {
-
- struct Foo {
- operator unsigned long(); // @160
- operator unsigned short(); // @161
- };
-
- void bar() {
- Foo x;
- int *p = new int[x]; // @166
- }
-}
-
-#ifdef CXX1Y
-#else
-//expected-error@166 {{ambiguous conversion of array size expression of type 'extended_examples_array_bounds::Foo' to an integral or enumeration type}}
-//expected-note@160 {{conversion to integral type 'unsigned long' declared here}}
-//expected-note@161 {{conversion to integral type 'unsigned short' declared here}}
-#endif
+// FIXME: Extend with more examples, including [expr.const] and [expr.new].
};
int *ArraySizeConversion = new int[ConvertToInt()];
#ifdef CXX1Y2
-// expected-warning@-2 {{implicit conversion from array size expression of type 'ConvertToInt' to integral type 'size_t' is incompatible with C++98}}
+// expected-warning@-2 {{implicit conversion from array size expression of type 'ConvertToInt' to integral type}} // 'unsigned long' is incompatible with C++98}}
#else
// expected-warning@-4 {{implicit conversion from array size expression of type 'ConvertToInt' to integral type 'int' is incompatible with C++98}}
#endif