Normalize the way paren types are stripped in Sema.

This commit is contained in:
Robert Widmann
2016-10-06 16:01:32 -04:00
parent 59aefbc511
commit f59d5cb577
6 changed files with 8 additions and 30 deletions

View File

@@ -1487,9 +1487,7 @@ struct ASTNodeBase {};
/// Retrieve the ith element type from the resulting tuple type.
auto getOuterElementType = [&](unsigned i) -> Type {
if (!TT) {
if (auto parenTy = dyn_cast<ParenType>(E->getType().getPointer()))
return parenTy->getUnderlyingType();
return E->getType();
return E->getType()->getWithoutParens();
}
return TT->getElementType(i);