On Wed, Nov 28, 2012 at 7:04 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Wed, Nov 28, 2012 at 6:58 PM, NAKAMURA Takumi <span dir="ltr"><<a href="mailto:geek4civic@gmail.com" target="_blank">geek4civic@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_quote">
<div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Modified: cfe/branches/release_32/test/SemaTemplate/instantiate-overload-candidates.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/test/SemaTemplate/instantiate-overload-candidates.cpp?rev=168830&r1=168829&r2=168830&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/test/SemaTemplate/instantiate-overload-candidates.cpp?rev=168830&r1=168829&r2=168830&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/branches/release_32/test/SemaTemplate/instantiate-overload-candidates.cpp (original)<br>
> +++ cfe/branches/release_32/test/SemaTemplate/instantiate-overload-candidates.cpp Wed Nov 28 17:44:46 2012<br>
> @@ -19,3 +19,34 @@<br>
> void test(int x) {<br>
> f(&x, 0);<br>
> }<br>
> +<br>
> +// Ensure that we instantiate an overloaded function if it's selected by<br>
> +// overload resolution when initializing a function pointer.<br>
> +template<typename T> struct X {<br>
> + static T f() { T::error; } // expected-error {{has no members}}<br>
> + static T f(bool);<br>
> +};<br>
> +void (*p)() = &X<void>().f; // expected-note {{instantiation of}}<br>
<br>
It has been introduced in r167918 and causes failure in release_32.<br>
<br>
<a href="http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/74" target="_blank">http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/74</a><br>
--<br>
error: 'error' diagnostics expected but not seen:<br>
Line 26: has no members<br>
error: 'note' diagnostics expected but not seen:<br>
Line 29: instantiation of<br>
2 errors generated.<br>
--<br>
<br>
Pawel, I suggest you a couple of options;<br>
<br>
1) Remove the extra test.<br>
<br>
2) Apply Richard's r167918, too. Doug and Richard, how do you think?</blockquote><div><br></div></div></div><div>Yes, r167918 is a low-risk change, and seems like a good candidate for porting to the branch. </div></div>
</blockquote></div><br><div>Hmm, do we only have half of that change on the branch?</div>