forked from OSchip/llvm-project
Unnest assignment to make the code more clear
llvm-svn: 39363
This commit is contained in:
parent
0e13faa8ce
commit
cceab1a8b7
|
@ -270,8 +270,9 @@ TypeRef ASTContext::getTypedefType(TypedefDecl *Decl) {
|
|||
|
||||
// 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 @@ TypeRef ASTContext::getTagDeclType(TagDecl *Decl) {
|
|||
// 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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue