<div dir="ltr">I wasn't aware of this directory, it does seem like a better place. Moved in r210064. Thanks.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 31, 2014 at 9:00 PM, Edoardo P. <span dir="ltr"><<a href="mailto:ed0.88.prez@gmail.com" target="_blank">ed0.88.prez@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I'd like to say that, IMHO, DR532 test should be moved to a more<br>
proper place, like test/CXX/drs/dr5xx.cpp .<br>
What do you think about this?<br>
<br>
2014-05-31 4:11 GMT+02:00 Nikola Smiljanic <<a href="mailto:popizdeh@gmail.com">popizdeh@gmail.com</a>>:<br>
> Author: nikola<br>
> Date: Fri May 30 21:10:59 2014<br>
> New Revision: 209955<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=209955&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=209955&view=rev</a><br>
> Log:<br>
> PR12961 - Extend DR532 to cover C++98/03.<br>
><br>
> Removed:<br>
> cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp<br>
> Modified:<br>
> cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp<br>
> cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp<br>
><br>
> Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=209955&r1=209954&r2=209955&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=209955&r1=209954&r2=209955&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp (original)<br>
> +++ cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Fri May 30 21:10:59 2014<br>
> @@ -4178,34 +4178,24 @@ static bool isAtLeastAsSpecializedAs(Sem<br>
> // otherwise, the ordering rules for static functions against non-static<br>
> // functions don't make any sense.<br>
> //<br>
> - // C++98/03 doesn't have this provision, so instead we drop the<br>
> - // first argument of the free function, which seems to match<br>
> - // existing practice.<br>
> + // C++98/03 doesn't have this provision but we've extended DR532 to cover<br>
> + // it as wording was broken prior to it.<br>
> SmallVector<QualType, 4> Args1;<br>
><br>
> - unsigned Skip1 = 0, Skip2 = 0;<br>
> unsigned NumComparedArguments = NumCallArguments1;<br>
><br>
> if (!Method2 && Method1 && !Method1->isStatic()) {<br>
> - if (S.getLangOpts().CPlusPlus11) {<br>
> - // Compare 'this' from Method1 against first parameter from Method2.<br>
> - AddImplicitObjectParameterType(S.Context, Method1, Args1);<br>
> - ++NumComparedArguments;<br>
> - } else<br>
> - // Ignore first parameter from Method2.<br>
> - ++Skip2;<br>
> + // Compare 'this' from Method1 against first parameter from Method2.<br>
> + AddImplicitObjectParameterType(S.Context, Method1, Args1);<br>
> + ++NumComparedArguments;<br>
> } else if (!Method1 && Method2 && !Method2->isStatic()) {<br>
> - if (S.getLangOpts().CPlusPlus11)<br>
> - // Compare 'this' from Method2 against first parameter from Method1.<br>
> - AddImplicitObjectParameterType(S.Context, Method2, Args2);<br>
> - else<br>
> - // Ignore first parameter from Method1.<br>
> - ++Skip1;<br>
> + // Compare 'this' from Method2 against first parameter from Method1.<br>
> + AddImplicitObjectParameterType(S.Context, Method2, Args2);<br>
> }<br>
><br>
> - Args1.insert(Args1.end(), Proto1->param_type_begin() + Skip1,<br>
> + Args1.insert(Args1.end(), Proto1->param_type_begin(),<br>
> Proto1->param_type_end());<br>
> - Args2.insert(Args2.end(), Proto2->param_type_begin() + Skip2,<br>
> + Args2.insert(Args2.end(), Proto2->param_type_begin(),<br>
> Proto2->param_type_end());<br>
><br>
> // C++ [temp.func.order]p5:<br>
><br>
> Removed: cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp?rev=209954&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp?rev=209954&view=auto</a><br>
> ==============================================================================<br>
> --- cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp (original)<br>
> +++ cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp (removed)<br>
> @@ -1,52 +0,0 @@<br>
> -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s<br>
> -// expected-no-diagnostics<br>
> -<br>
> -// Core DR 532.<br>
> -namespace PR8130 {<br>
> - struct A { };<br>
> -<br>
> - template<class T> struct B {<br>
> - template<class R> int &operator*(R&);<br>
> - };<br>
> -<br>
> - template<class T, class R> float &operator*(T&, R&);<br>
> - void test() {<br>
> - A a;<br>
> - B<A> b;<br>
> - int &ir = b * a;<br>
> - }<br>
> -}<br>
> -<br>
> -namespace OperatorWithRefQualifier {<br>
> - struct A { };<br>
> - template<class T> struct B {<br>
> - template<class R> int &operator*(R&) &&;<br>
> - };<br>
> -<br>
> - template<class T, class R> float &operator*(T&&, R&);<br>
> - void test() {<br>
> - A a;<br>
> - B<A> b;<br>
> - float &ir = b * a;<br>
> - int &ir2 = B<A>() * a;<br>
> - }<br>
> -}<br>
> -<br>
> -namespace OrderWithStaticMember {<br>
> - struct A {<br>
> - template<class T> int g(T**, int=0) { return 0; }<br>
> - template<class T> static int g(T*) { return 1; }<br>
> - };<br>
> - void f() {<br>
> - A a;<br>
> - int **p;<br>
> - a.g(p);<br>
> - }<br>
> -}<br>
> -<br>
> -namespace PR17075 {<br>
> - template <typename T> struct V {};<br>
> - struct S { template<typename T> S &operator>>(T &t) = delete; };<br>
> - template<typename T> S &operator>>(S &s, V<T> &v);<br>
> - void f(S s, V<int> v) { s >> v; }<br>
> -}<br>
><br>
> Modified: cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp?rev=209955&r1=209954&r2=209955&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp?rev=209955&r1=209954&r2=209955&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp (original)<br>
> +++ cfe/trunk/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp Fri May 30 21:10:59 2014<br>
> @@ -1,18 +1,20 @@<br>
> -// RUN: %clang_cc1 -fsyntax-only -verify %s<br>
> +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s<br>
> +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s<br>
> // expected-no-diagnostics<br>
><br>
> -namespace DeduceVsMember {<br>
> - template<typename T><br>
> - struct X {<br>
> - template<typename U><br>
> - int &operator==(const U& other) const;<br>
> - };<br>
> +// Core DR 532.<br>
> +namespace PR8130 {<br>
> + struct A { };<br>
><br>
> - template<typename T, typename U><br>
> - float &operator==(const T&, const X<U>&);<br>
> + template<class T> struct B {<br>
> + template<class R> int &operator*(R&);<br>
> + };<br>
><br>
> - void test(X<int> xi, X<float> xf) {<br>
> - float& ir = (xi == xf);<br>
> + template<class T, class R> float &operator*(T&, R&);<br>
> + void test() {<br>
> + A a;<br>
> + B<A> b;<br>
> + int &ir = b * a;<br>
> }<br>
> }<br>
><br>
> @@ -27,3 +29,27 @@ namespace OrderWithStaticMember {<br>
> a.g(p);<br>
> }<br>
> }<br>
> +<br>
> +#if __cplusplus >= 201103L<br>
> +namespace OperatorWithRefQualifier {<br>
> + struct A { };<br>
> + template<class T> struct B {<br>
> + template<class R> int &operator*(R&) &&;<br>
> + };<br>
> +<br>
> + template<class T, class R> float &operator*(T&&, R&);<br>
> + void test() {<br>
> + A a;<br>
> + B<A> b;<br>
> + float &ir = b * a;<br>
> + int &ir2 = B<A>() * a;<br>
> + }<br>
> +}<br>
> +<br>
> +namespace PR17075 {<br>
> + template <typename T> struct V {};<br>
> + struct S { template<typename T> S &operator>>(T &t) = delete; };<br>
> + template<typename T> S &operator>>(S &s, V<T> &v);<br>
> + void f(S s, V<int> v) { s >> v; }<br>
> +}<br>
> +#endif<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Mathematics is the language with which God has written the universe. (Galilei)<br>
</font></span></blockquote></div><br></div>