[cfe-commits] r110678 - /cfe/trunk/lib/Sema/TreeTransform.h
Douglas Gregor
dgregor at apple.com
Tue Aug 10 07:27:00 PDT 2010
Author: dgregor
Date: Tue Aug 10 09:27:00 2010
New Revision: 110678
URL: http://llvm.org/viewvc/llvm-project?rev=110678&view=rev
Log:
Eliminate unnecessary uses of TemporaryBase in TreeTransform;
transforming TypeSourceInfos already gives us proper (and better)
source-location information.
Modified:
cfe/trunk/lib/Sema/TreeTransform.h
Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=110678&r1=110677&r2=110678&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Tue Aug 10 09:27:00 2010
@@ -4783,14 +4783,9 @@
template<typename Derived>
Sema::OwningExprResult
TreeTransform<Derived>::TransformVAArgExpr(VAArgExpr *E) {
- TypeSourceInfo *TInfo;
- {
- // FIXME: Source location isn't quite accurate.
- TemporaryBase Rebase(*this, E->getBuiltinLoc(), DeclarationName());
- TInfo = getDerived().TransformType(E->getWrittenTypeInfo());
- if (!TInfo)
- return SemaRef.ExprError();
- }
+ TypeSourceInfo *TInfo = getDerived().TransformType(E->getWrittenTypeInfo());
+ if (!TInfo)
+ return SemaRef.ExprError();
OwningExprResult SubExpr = getDerived().TransformExpr(E->getSubExpr());
if (SubExpr.isInvalid())
@@ -4858,18 +4853,14 @@
TreeTransform<Derived>::TransformTypesCompatibleExpr(TypesCompatibleExpr *E) {
TypeSourceInfo *TInfo1;
TypeSourceInfo *TInfo2;
- {
- // FIXME: Source location isn't quite accurate.
- TemporaryBase Rebase(*this, E->getBuiltinLoc(), DeclarationName());
-
- TInfo1 = getDerived().TransformType(E->getArgTInfo1());
- if (!TInfo1)
- return SemaRef.ExprError();
+
+ TInfo1 = getDerived().TransformType(E->getArgTInfo1());
+ if (!TInfo1)
+ return SemaRef.ExprError();
- TInfo2 = getDerived().TransformType(E->getArgTInfo2());
- if (!TInfo2)
- return SemaRef.ExprError();
- }
+ TInfo2 = getDerived().TransformType(E->getArgTInfo2());
+ if (!TInfo2)
+ return SemaRef.ExprError();
if (!getDerived().AlwaysRebuild() &&
TInfo1 == E->getArgTInfo1() &&
More information about the cfe-commits
mailing list