Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] visibility of typedefs/type aliases

I agree that typedefs require special treatment. Will you be willing to give it a shot?

-sergey


On Wed, Feb 12, 2014 at 9:12 AM, scalpel4k <scalpel4k@xxxxxxxxx> wrote:
Hi,

I've run CDT with the debugger and found this check in

ClassTypeHelper.java (line 955ff)

...
if (member instanceof IType &&
     memberBinding instanceof IType &&
     ((IType) member).isSameType((IType) memberBinding) )
{
        return visibility;
}

what this does in case of member == typedef or type alias, isSameType check
returns the visibility of the underlying type. As far as I know this isn't
correct, at least not in C++11. A typedef can change the visibility of its
base type.
My question here is, are there any other situations where this check is
required? Otherwise typedefs have to be treated separately.

I ask this question with respect to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=427730
where you can find a code example.

thx Michi
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top