[cfe-dev] Fix for PR4701
David Chisnall
csdavec at swansea.ac.uk
Tue Aug 18 08:57:41 PDT 2009
On 18 Aug 2009, at 16:47, Daniel Dunbar wrote:
> I think you missed the point here.
>
> If ObjCIdRedefinitionType has not been assigned, then it will be the
> null QualType. The comparison will succeed (since BaseType is not
> null), then BaseType will be assigned to the null type, then the code
> will crash a few lines later.
Once again, can you provide a test case which demonstrates this? I
have tests which attempt to access fields on an id-typed variable with
no definition of id provided, and they do not crash and do use this
code path. If you can demonstrate a condition where this manifests as
a bug, then I would be more than happy to fix it. As, at the moment,
it is working as I expect it to work, so I can't fix it because I am
not seeing any breakage.
The comparison is only there to avoid a redundant implicit cast when
there is one already (which can only happen in cases where a
redefinition is supplied).
David
More information about the cfe-dev
mailing list