[cfe-commits] r110295 - in /cfe/trunk: lib/AST/Type.cpp test/CXX/conv/conv.ptr/p2.cpp
Eli Friedman
eli.friedman at gmail.com
Wed Aug 4 19:02:40 PDT 2010
On Wed, Aug 4, 2010 at 6:21 PM, Sebastian Redl
<sebastian.redl at getdesigned.at> wrote:
> Author: cornedbee
> Date: Wed Aug 4 20:21:19 2010
> New Revision: 110295
>
> URL: http://llvm.org/viewvc/llvm-project?rev=110295&view=rev
> Log:
> Drop an unjustified limitation from Type::isObjectType(). Fixes PR7801 and doesn't seem to break anything.
This does have other effects...
Now accepted:
template<int(*foo)[]> void f() {}
(Also accepted by gcc and comeau.)
Now accepted:
struct t { typedef int (*foo)[]; operator foo(); }; void g() { t o; delete o; }
(Rejected by gcc, accepted by comeau.)
Now rejected:
struct s { typedef int (*foo)[]; operator foo&(); operator int*&(); };
void f() { s o; ++o; }
(Rejected by gcc, accepted by comeau.)
I think clang is behaving correctly, but I'd like some confirmation,
and it might be a good idea to add tests.
-Eli
More information about the cfe-commits
mailing list