Index: lib/Sema/SemaDecl.cpp =================================================================== --- lib/Sema/SemaDecl.cpp (revision 55897) +++ lib/Sema/SemaDecl.cpp (working copy) @@ -230,6 +230,11 @@ /// situation, merging decls or emitting diagnostics as appropriate. /// TypedefDecl *Sema::MergeTypeDefDecl(TypedefDecl *New, Decl *OldD) { + // Allow multiple definitions for ObjC built-in typedefs. + // FIXME: Verify the underlying types are equivalent! + if (getLangOptions().ObjC1 && isBuiltinObjCType(New)) + return New; + // Verify the old decl was also a typedef. TypedefDecl *Old = dyn_cast(OldD); if (!Old) { @@ -251,10 +257,6 @@ return Old; } - // Allow multiple definitions for ObjC built-in typedefs. - // FIXME: Verify the underlying types are equivalent! - if (getLangOptions().ObjC1 && isBuiltinObjCType(New)) - return Old; if (getLangOptions().Microsoft) return New;