r200105 - Rename getResultLoc() too
Alp Toker
alp at nuanti.com
Sat Jan 25 15:51:37 PST 2014
Author: alp
Date: Sat Jan 25 17:51:36 2014
New Revision: 200105
URL: http://llvm.org/viewvc/llvm-project?rev=200105&view=rev
Log:
Rename getResultLoc() too
Follow up to r200082.
Spotted by Dmitri
Modified:
cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
cfe/trunk/include/clang/AST/TypeLoc.h
cfe/trunk/lib/AST/Comment.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/lib/Sema/SemaLambda.cpp
cfe/trunk/lib/Sema/SemaStmt.cpp
cfe/trunk/lib/Sema/TreeTransform.h
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/DataRecursiveASTVisitor.h Sat Jan 25 17:51:36 2014
@@ -1093,12 +1093,12 @@ DEF_TRAVERSE_TYPELOC(ExtVectorType, {
})
DEF_TRAVERSE_TYPELOC(FunctionNoProtoType, {
- TRY_TO(TraverseTypeLoc(TL.getResultLoc()));
+ TRY_TO(TraverseTypeLoc(TL.getReturnLoc()));
})
// FIXME: location of exception specifications (attributes?)
DEF_TRAVERSE_TYPELOC(FunctionProtoType, {
- TRY_TO(TraverseTypeLoc(TL.getResultLoc()));
+ TRY_TO(TraverseTypeLoc(TL.getReturnLoc()));
const FunctionProtoType *T = TL.getTypePtr();
@@ -2194,7 +2194,7 @@ bool DataRecursiveASTVisitor<Derived>::T
TRY_TO(TraverseDecl(Proto.getParam(I)));
}
} else {
- TRY_TO(TraverseTypeLoc(Proto.getResultLoc()));
+ TRY_TO(TraverseTypeLoc(Proto.getReturnLoc()));
}
}
}
Modified: cfe/trunk/include/clang/AST/RecursiveASTVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/RecursiveASTVisitor.h?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/RecursiveASTVisitor.h (original)
+++ cfe/trunk/include/clang/AST/RecursiveASTVisitor.h Sat Jan 25 17:51:36 2014
@@ -1174,12 +1174,12 @@ DEF_TRAVERSE_TYPELOC(ExtVectorType, {
})
DEF_TRAVERSE_TYPELOC(FunctionNoProtoType, {
- TRY_TO(TraverseTypeLoc(TL.getResultLoc()));
+ TRY_TO(TraverseTypeLoc(TL.getReturnLoc()));
})
// FIXME: location of exception specifications (attributes?)
DEF_TRAVERSE_TYPELOC(FunctionProtoType, {
- TRY_TO(TraverseTypeLoc(TL.getResultLoc()));
+ TRY_TO(TraverseTypeLoc(TL.getReturnLoc()));
const FunctionProtoType *T = TL.getTypePtr();
@@ -2218,7 +2218,7 @@ bool RecursiveASTVisitor<Derived>::Trave
TRY_TO(TraverseDecl(Proto.getParam(I)));
}
} else {
- TRY_TO(TraverseTypeLoc(Proto.getResultLoc()));
+ TRY_TO(TraverseTypeLoc(Proto.getReturnLoc()));
}
}
}
Modified: cfe/trunk/include/clang/AST/TypeLoc.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/TypeLoc.h (original)
+++ cfe/trunk/include/clang/AST/TypeLoc.h Sat Jan 25 17:51:36 2014
@@ -1224,7 +1224,7 @@ public:
ParmVarDecl *getParam(unsigned i) const { return getParmArray()[i]; }
void setParam(unsigned i, ParmVarDecl *VD) { getParmArray()[i] = VD; }
- TypeLoc getResultLoc() const {
+ TypeLoc getReturnLoc() const {
return getInnerTypeLoc();
}
Modified: cfe/trunk/lib/AST/Comment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Comment.cpp?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Comment.cpp (original)
+++ cfe/trunk/lib/AST/Comment.cpp Sat Jan 25 17:51:36 2014
@@ -281,7 +281,7 @@ void DeclInfo::fill() {
ArrayRef<ParmVarDecl *> Params = FTL.getParams();
ParamVars = ArrayRef<const ParmVarDecl *>(Params.data(),
Params.size());
- ReturnType = FTL.getResultLoc().getType();
+ ReturnType = FTL.getReturnLoc().getType();
break;
}
if (TemplateSpecializationTypeLoc STL =
@@ -302,7 +302,7 @@ void DeclInfo::fill() {
ArrayRef<ParmVarDecl *> Params = FTL.getParams();
ParamVars = ArrayRef<const ParmVarDecl *>(Params.data(),
Params.size());
- ReturnType = FTL.getResultLoc().getType();
+ ReturnType = FTL.getReturnLoc().getType();
}
break;
}
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sat Jan 25 17:51:36 2014
@@ -7652,7 +7652,7 @@ static SourceRange getResultSourceRange(
if (!FunctionTL)
return SourceRange();
- TypeLoc ResultTL = FunctionTL.getResultLoc();
+ TypeLoc ResultTL = FunctionTL.getReturnLoc();
if (ResultTL.getUnqualifiedLoc().getAs<BuiltinTypeLoc>())
return ResultTL.getSourceRange();
@@ -9732,7 +9732,7 @@ Decl *Sema::ActOnFinishFunctionBody(Decl
} else {
// Substitute 'void' for the 'auto' in the type.
TypeLoc ResultType = FD->getTypeSourceInfo()->getTypeLoc().
- IgnoreParens().castAs<FunctionProtoTypeLoc>().getResultLoc();
+ IgnoreParens().castAs<FunctionProtoTypeLoc>().getReturnLoc();
Context.adjustDeducedFunctionResultType(
FD, SubstAutoType(ResultType.getType(), Context.VoidTy));
}
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Sat Jan 25 17:51:36 2014
@@ -3015,7 +3015,7 @@ static void handleGlobalAttr(Sema &S, De
if (FunctionTypeLoc FTL = TL.getAs<FunctionTypeLoc>()) {
S.Diag(FD->getTypeSpecStartLoc(), diag::err_kern_type_not_void_return)
<< FD->getType()
- << FixItHint::CreateReplacement(FTL.getResultLoc().getSourceRange(),
+ << FixItHint::CreateReplacement(FTL.getReturnLoc().getSourceRange(),
"void");
} else {
S.Diag(FD->getTypeSpecStartLoc(), diag::err_kern_type_not_void_return)
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Sat Jan 25 17:51:36 2014
@@ -4246,7 +4246,7 @@ struct CheckAbstractUsage {
}
void Check(FunctionProtoTypeLoc TL, Sema::AbstractDiagSelID Sel) {
- Visit(TL.getResultLoc(), Sema::AbstractReturnType);
+ Visit(TL.getReturnLoc(), Sema::AbstractReturnType);
for (unsigned I = 0, E = TL.getNumParams(); I != E; ++I) {
if (!TL.getParam(I))
continue;
@@ -12656,7 +12656,7 @@ bool Sema::checkThisInStaticMemberFuncti
// If the return type came after the cv-qualifier-seq, check it now.
if (Proto->hasTrailingReturn() &&
- !Finder.TraverseTypeLoc(ProtoTL.getResultLoc()))
+ !Finder.TraverseTypeLoc(ProtoTL.getReturnLoc()))
return true;
// Check the exception specification.
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Sat Jan 25 17:51:36 2014
@@ -10308,7 +10308,7 @@ void Sema::ActOnBlockArguments(SourceLoc
ExplicitSignature.getLocalRangeEnd()) {
// This would be much cheaper if we stored TypeLocs instead of
// TypeSourceInfos.
- TypeLoc Result = ExplicitSignature.getResultLoc();
+ TypeLoc Result = ExplicitSignature.getReturnLoc();
unsigned Size = Result.getFullDataSize();
Sig = Context.CreateTypeSourceInfo(Result.getType(), Size);
Sig->getTypeLoc().initializeFullCopy(Result, Size);
Modified: cfe/trunk/lib/Sema/SemaLambda.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLambda.cpp?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLambda.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLambda.cpp Sat Jan 25 17:51:36 2014
@@ -1210,7 +1210,7 @@ static void addFunctionPointerConversion
ConvTSI->getTypeLoc().getAs<FunctionProtoTypeLoc>();
// Get the result of the conversion function which is a pointer-to-function.
PointerTypeLoc PtrToFunctionTL =
- ConvTL.getResultLoc().getAs<PointerTypeLoc>();
+ ConvTL.getReturnLoc().getAs<PointerTypeLoc>();
// Do the same for the TypeSourceInfo that is used to name the conversion
// operator.
PointerTypeLoc ConvNamePtrToFunctionTL =
Modified: cfe/trunk/lib/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmt.cpp?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Sat Jan 25 17:51:36 2014
@@ -2712,7 +2712,7 @@ bool Sema::DeduceFunctionTypeFromReturnE
Expr *&RetExpr,
AutoType *AT) {
TypeLoc OrigResultType = FD->getTypeSourceInfo()->getTypeLoc().
- IgnoreParens().castAs<FunctionProtoTypeLoc>().getResultLoc();
+ IgnoreParens().castAs<FunctionProtoTypeLoc>().getReturnLoc();
QualType Deduced;
if (RetExpr && isa<InitListExpr>(RetExpr)) {
Modified: cfe/trunk/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/TreeTransform.h?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/TreeTransform.h (original)
+++ cfe/trunk/lib/Sema/TreeTransform.h Sat Jan 25 17:51:36 2014
@@ -4368,13 +4368,13 @@ TreeTransform<Derived>::TransformFunctio
// declarator.
Sema::CXXThisScopeRAII ThisScope(SemaRef, ThisContext, ThisTypeQuals);
- ResultType = getDerived().TransformType(TLB, TL.getResultLoc());
+ ResultType = getDerived().TransformType(TLB, TL.getReturnLoc());
if (ResultType.isNull())
return QualType();
}
}
else {
- ResultType = getDerived().TransformType(TLB, TL.getResultLoc());
+ ResultType = getDerived().TransformType(TLB, TL.getReturnLoc());
if (ResultType.isNull())
return QualType();
@@ -4413,7 +4413,7 @@ QualType TreeTransform<Derived>::Transfo
TypeLocBuilder &TLB,
FunctionNoProtoTypeLoc TL) {
const FunctionNoProtoType *T = TL.getTypePtr();
- QualType ResultType = getDerived().TransformType(TLB, TL.getResultLoc());
+ QualType ResultType = getDerived().TransformType(TLB, TL.getReturnLoc());
if (ResultType.isNull())
return QualType();
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=200105&r1=200104&r2=200105&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Sat Jan 25 17:51:36 2014
@@ -769,7 +769,7 @@ bool CursorVisitor::VisitFunctionDecl(Fu
// If we have a function declared directly (without the use of a typedef),
// visit just the return type. Otherwise, just visit the function's type
// now.
- if ((FTL && !isa<CXXConversionDecl>(ND) && Visit(FTL.getResultLoc())) ||
+ if ((FTL && !isa<CXXConversionDecl>(ND) && Visit(FTL.getReturnLoc())) ||
(!FTL && Visit(TL)))
return true;
@@ -1517,7 +1517,7 @@ bool CursorVisitor::VisitAttributedTypeL
bool CursorVisitor::VisitFunctionTypeLoc(FunctionTypeLoc TL,
bool SkipResultType) {
- if (!SkipResultType && Visit(TL.getResultLoc()))
+ if (!SkipResultType && Visit(TL.getReturnLoc()))
return true;
for (unsigned I = 0, N = TL.getNumParams(); I != N; ++I)
@@ -2442,7 +2442,7 @@ bool CursorVisitor::RunVisitorWorkList(V
return true;
} else {
// Visit result type.
- if (Visit(Proto.getResultLoc()))
+ if (Visit(Proto.getReturnLoc()))
return true;
}
}
More information about the cfe-commits
mailing list