[cfe-commits] r43809 - /cfe/trunk/AST/ASTContext.cpp

Steve Naroff snaroff at apple.com
Tue Nov 6 22:03:52 PST 2007


Author: snaroff
Date: Wed Nov  7 00:03:51 2007
New Revision: 43809

URL: http://llvm.org/viewvc/llvm-project?rev=43809&view=rev
Log:

Teach ASTContext::tagTypesAreCompatible() about the built-in ObjC types (Class and id), removing a bogus warning.


Modified:
    cfe/trunk/AST/ASTContext.cpp

Modified: cfe/trunk/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/ASTContext.cpp?rev=43809&r1=43808&r2=43809&view=diff

==============================================================================
--- cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/trunk/AST/ASTContext.cpp Wed Nov  7 00:03:51 2007
@@ -1182,6 +1182,10 @@
     if (ldecl->getIdentifier() == rdecl->getIdentifier())
       return true;
   }
+  // "Class" and "id" are compatible built-in structure types.
+  if (isObjcIdType(lhs) && isObjcClassType(rhs) ||
+      isObjcClassType(lhs) && isObjcIdType(rhs))
+    return true;
   return false;
 }
 





More information about the cfe-commits mailing list