[cfe-dev] [Patch] Fix out of line constructor definition parsing.
Piotr Rak
piotr.rak at gmail.com
Wed Feb 25 13:00:37 PST 2009
Hi,
2009/2/25 Piotr Rak <piotr.rak at gmail.com>:
> Hi,
>
> I found small bug with where clang does not like:
>
> namespace A {
> struct S {
> S();
> S(int);
> void f1();
> void f2();
> operator int ();
> ~S();
> };
> }
>
> A::S::S() {}
>
> void A::S::f1() {}
>
> struct S {};
>
> A::S::S(int) {}
>
> void A::S::f2() {}
>
> A::S::operator int() { return 1; }
>
> A::S::~S() {}
>
> t2.cc:18:7: error: out-of-line definition does not match any declaration in 'S'
> A::S::S(int) {}
> ~~~~~ ^
> t2.cc:24:7: error: out-of-line definition does not match any declaration in 'S'
> A::S::~S() {}
> ~~~~~ ^
>
> Problem was that CXXScopeSpec was not passed to Actions.getTypeName(),
> and unqualified lookup was performed instead of qualified.
> Attached fix_ctor_parsing.patch solves this issue.
>
This does not apply anymore, resending updated version.
Piotr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_ctor_parsing_v2.patch
Type: text/x-patch
Size: 1750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090225/e82de1d1/attachment.bin>
More information about the cfe-dev
mailing list