]> granicus.if.org Git - clang/commitdiff
Fix a comment typo and add a couple suggestions from Chris.
authorSteve Naroff <snaroff@apple.com>
Wed, 2 Apr 2008 00:39:51 +0000 (00:39 +0000)
committerSteve Naroff <snaroff@apple.com>
Wed, 2 Apr 2008 00:39:51 +0000 (00:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49066 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/Sema.h
lib/Sema/SemaDecl.cpp

index e30f4b2b38f5067d2260f320251ac46eddd9695f..a91d3da720d9bd28ce17b41cbd1eb32141303513 100644 (file)
@@ -99,7 +99,8 @@ class Sema : public Action {
   /// with @compatibility_alias, so that we can emit errors on duplicates and
   /// find the declarations when needed. This construct is ancient and will
   /// likely never be seen. Nevertheless, it is here for compatibility.
-  typedef llvm::DenseMap<IdentifierInfo*, ObjCCompatibleAliasDecl*> ObjCAliasTy;
+  typedef llvm::DenseMap<const IdentifierInfo*, 
+                         ObjCCompatibleAliasDecl*> ObjCAliasTy;
   ObjCAliasTy ObjCAliasDecls;
   
   // Enum values used by KnownFunctionIDs (see below).
index 0280ef2127b35a2583dcb3f9672085e8f3c7b81e..c958dd1027c45697e1a1f9d3820a02ef8fc4670a 100644 (file)
@@ -42,7 +42,7 @@ Sema::DeclTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S) const {
     if (getLangOptions().ObjC1) {
       // @interface and @compatibility_alias result in new type references. 
       // Creating a class alias is *extremely* rare.
-      ObjCAliasTy::const_iterator I = ObjCAliasDecls.find((IdentifierInfo*)&II);
+      ObjCAliasTy::const_iterator I = ObjCAliasDecls.find(&II);
       if (I != ObjCAliasDecls.end())
         return I->second->getClassInterface();
     }    
@@ -141,7 +141,7 @@ Decl *Sema::LookupDecl(IdentifierInfo *II, unsigned NSI,
     if (getLangOptions().ObjC1) {
       // @interface and @compatibility_alias introduce typedef-like names.
       // Unlike typedef's, they can only be introduced at file-scope (and are 
-      // not therefore not scoped decls). They can, however, be shadowed by
+      // therefore not scoped decls). They can, however, be shadowed by
       // other names in IDNS_Ordinary.
       ObjCAliasTy::iterator I = ObjCAliasDecls.find(II);
       if (I != ObjCAliasDecls.end())