Skip to content

Commit 843539b

Browse files
authored
[typechecker] simplify code
1 parent 7dcb14f commit 843539b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,13 +2005,7 @@ Type TypeResolver::resolveAttributedType(TypeAttributes &attrs,
20052005
if (auto type = resolveTopLevelIdentTypeComponent(resolution, CITR,
20062006
typeAliasResolver)) {
20072007
if (auto TAT = dyn_cast<TypeAliasType>(type.getPointer())) {
2008-
if (auto underlyingRepr = TAT->getDecl()
2009-
->getUnderlyingTypeLoc()
2010-
.getTypeRepr()) {
2011-
if (!underlyingRepr->isInvalid()) {
2012-
repr = underlyingRepr;
2013-
}
2014-
}
2008+
repr = TAT->getDecl()->getUnderlyingTypeLoc().getTypeRepr();
20152009
}
20162010
}
20172011
}

0 commit comments

Comments
 (0)