[cfe-dev] Q on patch for CWG 2352
Shoaib Meenai via cfe-dev
cfe-dev at lists.llvm.org
Wed Mar 4 13:56:10 PST 2020
Also +Hans for the question about the release.
From: cfe-dev <cfe-dev-bounces at lists.llvm.org> on behalf of cfe-dev <cfe-dev at lists.llvm.org>
Reply-To: David Blaikie <dblaikie at gmail.com>
Date: Wednesday, March 4, 2020 at 1:33 PM
To: "Robinson, Paul" <paul.robinson at sony.com>, Richard Smith <richard at metafoo.co.uk>
Cc: cfe-dev <cfe-dev at lists.llvm.org>
Subject: Re: [cfe-dev] Q on patch for CWG 2352
+Richard Smith<mailto:richard at metafoo.co.uk> for visibility.
On Wed, Mar 4, 2020 at 12:56 PM Robinson, Paul via cfe-dev <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>> wrote:
Richard Smith made a patch in f041e9ad for CWG2352.
As a consequence of this patch, we had an obscure test failure,
and it's not clear to me that it's an intentional consequence.
So I figured I'd ask here.
Reduced test case:
bool foo(void * const * const * &&) { return false; }
bool foo(void * * const * const &) { return true; }
bool bar() {
return foo(reinterpret_cast<void***>(2));
}
Prior to the patch, the compiler selected the second overload;
after the patch, it selects the first overload. Apparently there's
some subtle difference in the preferred-ness of one over the other,
and AFAICT the const-nesses aren't supposed to factor in any more?
so it's about the &-ref versus the &&-ref?
As I said, mainly I want to make sure this was intentional; if it
is, we can fiddle our test and that's the end of it. But if it's
not intentional, this change is in the almost-final Clang 10.0
release, and might want to be fixed before it goes out.
Thanks,
--paulr
_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Ddev&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=IBW1MEu-Sx7haLmkx4JDCGG9wdGyY__f9L2GIlMtCqE&s=RKyV-TNDn011xSxc2o5by_ycuAC7pkTH_uEJBUChqCE&e=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200304/33d6ae0f/attachment-0001.html>
More information about the cfe-dev
mailing list