Skip to content
Commit dd710637 authored by Argyrios Kyrtzidis's avatar Argyrios Kyrtzidis
Browse files

When declaring an ObjC interface decl with a @compatibility_alias alias name,...

When declaring an ObjC interface decl with a @compatibility_alias alias name, change the class name to the "real" one.

If we have something like

  @class NewImage;
  @compatibility_alias OldImage NewImage;
  @class OldImage;

the lookup for 'OldImage' will return the 'NewImage' decl ("@class NewImage").
In such a case, when creating the decl for "@class OldImage" use the real declaration name ("NewImage"),
instead of the alias one ("OldImage"), otherwise we will break IdentifierResolver and redecls-chain invariants.

Fixes crash of rdar://14112291.

llvm-svn: 184238
parent a721731f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment