зеркало из https://github.com/microsoft/clang-1.git
Eliminate unnecessary uses of TemporaryBase in TreeTransform;
transforming TypeSourceInfos already gives us proper (and better) source-location information. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
22f638a58e
Коммит
9bcd4d4a4b
|
@ -4783,14 +4783,9 @@ TreeTransform<Derived>::TransformImplicitValueInitExpr(
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
Sema::OwningExprResult
|
Sema::OwningExprResult
|
||||||
TreeTransform<Derived>::TransformVAArgExpr(VAArgExpr *E) {
|
TreeTransform<Derived>::TransformVAArgExpr(VAArgExpr *E) {
|
||||||
TypeSourceInfo *TInfo;
|
TypeSourceInfo *TInfo = getDerived().TransformType(E->getWrittenTypeInfo());
|
||||||
{
|
|
||||||
// FIXME: Source location isn't quite accurate.
|
|
||||||
TemporaryBase Rebase(*this, E->getBuiltinLoc(), DeclarationName());
|
|
||||||
TInfo = getDerived().TransformType(E->getWrittenTypeInfo());
|
|
||||||
if (!TInfo)
|
if (!TInfo)
|
||||||
return SemaRef.ExprError();
|
return SemaRef.ExprError();
|
||||||
}
|
|
||||||
|
|
||||||
OwningExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
|
OwningExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
|
||||||
if (SubExpr.isInvalid())
|
if (SubExpr.isInvalid())
|
||||||
|
@ -4858,9 +4853,6 @@ Sema::OwningExprResult
|
||||||
TreeTransform<Derived>::TransformTypesCompatibleExpr(TypesCompatibleExpr *E) {
|
TreeTransform<Derived>::TransformTypesCompatibleExpr(TypesCompatibleExpr *E) {
|
||||||
TypeSourceInfo *TInfo1;
|
TypeSourceInfo *TInfo1;
|
||||||
TypeSourceInfo *TInfo2;
|
TypeSourceInfo *TInfo2;
|
||||||
{
|
|
||||||
// FIXME: Source location isn't quite accurate.
|
|
||||||
TemporaryBase Rebase(*this, E->getBuiltinLoc(), DeclarationName());
|
|
||||||
|
|
||||||
TInfo1 = getDerived().TransformType(E->getArgTInfo1());
|
TInfo1 = getDerived().TransformType(E->getArgTInfo1());
|
||||||
if (!TInfo1)
|
if (!TInfo1)
|
||||||
|
@ -4869,7 +4861,6 @@ TreeTransform<Derived>::TransformTypesCompatibleExpr(TypesCompatibleExpr *E) {
|
||||||
TInfo2 = getDerived().TransformType(E->getArgTInfo2());
|
TInfo2 = getDerived().TransformType(E->getArgTInfo2());
|
||||||
if (!TInfo2)
|
if (!TInfo2)
|
||||||
return SemaRef.ExprError();
|
return SemaRef.ExprError();
|
||||||
}
|
|
||||||
|
|
||||||
if (!getDerived().AlwaysRebuild() &&
|
if (!getDerived().AlwaysRebuild() &&
|
||||||
TInfo1 == E->getArgTInfo1() &&
|
TInfo1 == E->getArgTInfo1() &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче