diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-17 19:26:19 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-17 19:26:19 +0000 |
commit | 09ce33ded0ab9a05e097d54c226ad037bd4d6113 (patch) | |
tree | 8440e1835dd97005e8c8c4f2161be85a40892117 /clang | |
parent | 34889cabcd3e417aa7b0e4e50fb192afa890cd26 (diff) | |
download | bcm5719-llvm-09ce33ded0ab9a05e097d54c226ad037bd4d6113.tar.gz bcm5719-llvm-09ce33ded0ab9a05e097d54c226ad037bd4d6113.zip |
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
llvm-svn: 184108
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 6 | ||||
-rw-r--r-- | clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp | 20 | ||||
-rw-r--r-- | clang/test/SemaCXX/cxx98-compat-pedantic.cpp | 2 |
3 files changed, 5 insertions, 23 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index d723c1fe77d..40af2075c3f 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -1205,9 +1205,9 @@ Sema::BuildCXXNew(SourceRange Range, bool UseGlobal, 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: diff --git a/clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp b/clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp index c91c361544c..f00bf1ea310 100644 --- a/clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp +++ b/clang/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp @@ -154,22 +154,4 @@ namespace extended_examples_cxx1y { //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]. diff --git a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp index 50ce6a49002..5fe7980994e 100644 --- a/clang/test/SemaCXX/cxx98-compat-pedantic.cpp +++ b/clang/test/SemaCXX/cxx98-compat-pedantic.cpp @@ -34,7 +34,7 @@ struct ConvertToInt { }; 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 |