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

clattner at cs.uiuc.edu clattner at cs.uiuc.edu
Wed Jul 11 09:43:38 PDT 2007


Author: clattner
Date: Wed Jul 11 11:43:37 2007
New Revision: 39363

URL: http://llvm.org/viewvc/llvm-project?rev=39363&view=rev
Log:
Unnest assignment to make the code more clear

Modified:
    cfe/cfe/trunk/AST/ASTContext.cpp

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

==============================================================================
--- cfe/cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/cfe/trunk/AST/ASTContext.cpp Wed Jul 11 11:43:37 2007
@@ -270,8 +270,9 @@
   
   // FIXME: does this lose qualifiers from the typedef??
   Type *Canonical = Decl->getUnderlyingType().getCanonicalType().getTypePtr();
-  Types.push_back(Decl->TypeForDecl = new TypedefType(Decl, Canonical));
-  return Types.back();
+  Decl->TypeForDecl = new TypedefType(Decl, Canonical);
+  Types.push_back(Decl->TypeForDecl);
+  return Decl->TypeForDecl;
 }
 
 /// getTagDeclType - Return the unique reference to the type for the
@@ -280,8 +281,9 @@
   // The decl stores the type cache.
   if (Decl->TypeForDecl) return Decl->TypeForDecl;
   
-  Types.push_back(Decl->TypeForDecl = new TagType(Decl, 0));
-  return Types.back();
+  Decl->TypeForDecl = new TagType(Decl, 0);
+  Types.push_back(Decl->TypeForDecl);
+  return Decl->TypeForDecl;
 }
 
 





More information about the cfe-commits mailing list