r184108 - Revert "Updated test cases for contextual conversion"
Rafael Espindola
rafael.espindola at gmail.com
Mon Jun 17 12:26:19 PDT 2013
Author: rafael
Date: Mon Jun 17 14:26:19 2013
New Revision: 184108
URL: http://llvm.org/viewvc/llvm-project?rev=184108&view=rev
Log:
Revert "Updated test cases for contextual conversion"
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
Modified:
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp
cfe/trunk/test/SemaCXX/cxx98-compat-pedantic.cpp
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=184108&r1=184107&r2=184108&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Mon Jun 17 14:26:19 2013
@@ -1205,9 +1205,9 @@ Sema::BuildCXXNew(SourceRange Range, boo
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:
Modified: cfe/trunk/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp?rev=184108&r1=184107&r2=184108&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp (original)
+++ cfe/trunk/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp Mon Jun 17 14:26:19 2013
@@ -154,22 +154,4 @@ namespace extended_examples_cxx1y {
//expected-error at 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 at 166 {{ambiguous conversion of array size expression of type 'extended_examples_array_bounds::Foo' to an integral or enumeration type}}
-//expected-note at 160 {{conversion to integral type 'unsigned long' declared here}}
-//expected-note at 161 {{conversion to integral type 'unsigned short' declared here}}
-#endif
+// FIXME: Extend with more examples, including [expr.const] and [expr.new].
Modified: cfe/trunk/test/SemaCXX/cxx98-compat-pedantic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx98-compat-pedantic.cpp?rev=184108&r1=184107&r2=184108&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx98-compat-pedantic.cpp (original)
+++ cfe/trunk/test/SemaCXX/cxx98-compat-pedantic.cpp Mon Jun 17 14:26:19 2013
@@ -34,7 +34,7 @@ struct ConvertToInt {
};
int *ArraySizeConversion = new int[ConvertToInt()];
#ifdef CXX1Y2
-// expected-warning at -2 {{implicit conversion from array size expression of type 'ConvertToInt' to integral type 'size_t' is incompatible with C++98}}
+// expected-warning at -2 {{implicit conversion from array size expression of type 'ConvertToInt' to integral type}} // 'unsigned long' is incompatible with C++98}}
#else
// expected-warning at -4 {{implicit conversion from array size expression of type 'ConvertToInt' to integral type 'int' is incompatible with C++98}}
#endif
More information about the cfe-commits
mailing list