From: Douglas Gregor Date: Wed, 28 Oct 2009 00:29:27 +0000 (+0000) Subject: Slightly improve source location information during template instantiation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5557b25bdbd63536f687ebb63a0bab55aa227626;p=clang Slightly improve source location information during template instantiation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85353 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index 15b1520447..b4ec2fa71e 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -3365,6 +3365,8 @@ template Sema::OwningExprResult TreeTransform::TransformSizeOfAlignOfExpr(SizeOfAlignOfExpr *E) { if (E->isArgumentType()) { + TemporaryBase Rebase(*this, E->getOperatorLoc(), DeclarationName()); + QualType T = getDerived().TransformType(E->getArgumentType()); if (T.isNull()) return SemaRef.ExprError(); @@ -3563,6 +3565,10 @@ TreeTransform::TransformConditionalOperator(ConditionalOperator *E) { template Sema::OwningExprResult TreeTransform::TransformImplicitCastExpr(ImplicitCastExpr *E) { + TemporaryBase Rebase(*this, E->getLocStart(), DeclarationName()); + + // FIXME: Will we ever have type information here? It seems like we won't, + // so do we even need to transform the type? QualType T = getDerived().TransformType(E->getType()); if (T.isNull()) return SemaRef.ExprError(); @@ -3759,6 +3765,10 @@ template Sema::OwningExprResult TreeTransform::TransformImplicitValueInitExpr( ImplicitValueInitExpr *E) { + TemporaryBase Rebase(*this, E->getLocStart(), DeclarationName()); + + // FIXME: Will we ever have proper type location here? Will we actually + // need to transform the type? QualType T = getDerived().TransformType(E->getType()); if (T.isNull()) return SemaRef.ExprError();