summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-25 23:51:36 +0000
committerAlp Toker <alp@nuanti.com>2014-01-25 23:51:36 +0000
commit42a16a67f53da8b0eceabdc92a5f89d93a4d2c74 (patch)
tree562f2357c7f10f8c19f0ee8c2ccdf2234b1f3f94
parent48a6daa70f7413dcc25dc11da8910af9849c1062 (diff)
downloadbcm5719-llvm-42a16a67f53da8b0eceabdc92a5f89d93a4d2c74.tar.gz
bcm5719-llvm-42a16a67f53da8b0eceabdc92a5f89d93a4d2c74.zip
Rename getResultLoc() too
Follow up to r200082. Spotted by Dmitri llvm-svn: 200105
-rw-r--r--clang/include/clang/AST/DataRecursiveASTVisitor.h6
-rw-r--r--clang/include/clang/AST/RecursiveASTVisitor.h6
-rw-r--r--clang/include/clang/AST/TypeLoc.h2
-rw-r--r--clang/lib/AST/Comment.cpp4
-rw-r--r--clang/lib/Sema/SemaDecl.cpp4
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp2
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp4
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
-rw-r--r--clang/lib/Sema/SemaLambda.cpp2
-rw-r--r--clang/lib/Sema/SemaStmt.cpp2
-rw-r--r--clang/lib/Sema/TreeTransform.h6
-rw-r--r--clang/tools/libclang/CIndex.cpp6
12 files changed, 23 insertions, 23 deletions
diff --git a/clang/include/clang/AST/DataRecursiveASTVisitor.h b/clang/include/clang/AST/DataRecursiveASTVisitor.h
index ae1be931bf2..068fe08cfd1 100644
--- a/clang/include/clang/AST/DataRecursiveASTVisitor.h
+++ b/clang/include/clang/AST/DataRecursiveASTVisitor.h
@@ -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>::TraverseLambdaExpr(LambdaExpr *S) {
TRY_TO(TraverseDecl(Proto.getParam(I)));
}
} else {
- TRY_TO(TraverseTypeLoc(Proto.getResultLoc()));
+ TRY_TO(TraverseTypeLoc(Proto.getReturnLoc()));
}
}
}
diff --git a/clang/include/clang/AST/RecursiveASTVisitor.h b/clang/include/clang/AST/RecursiveASTVisitor.h
index c5300d158bf..75774451c8f 100644
--- a/clang/include/clang/AST/RecursiveASTVisitor.h
+++ b/clang/include/clang/AST/RecursiveASTVisitor.h
@@ -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>::TraverseLambdaExpr(LambdaExpr *S) {
TRY_TO(TraverseDecl(Proto.getParam(I)));
}
} else {
- TRY_TO(TraverseTypeLoc(Proto.getResultLoc()));
+ TRY_TO(TraverseTypeLoc(Proto.getReturnLoc()));
}
}
}
diff --git a/clang/include/clang/AST/TypeLoc.h b/clang/include/clang/AST/TypeLoc.h
index 633089dccc7..a54aee87031 100644
--- a/clang/include/clang/AST/TypeLoc.h
+++ b/clang/include/clang/AST/TypeLoc.h
@@ -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();
}
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp
index b736b4825e5..b0b23510744 100644
--- a/clang/lib/AST/Comment.cpp
+++ b/clang/lib/AST/Comment.cpp
@@ -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;
}
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index d4be61a2276..a70bece3e89 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -7652,7 +7652,7 @@ static SourceRange getResultSourceRange(const FunctionDecl *FD) {
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 *dcl, Stmt *Body,
} 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));
}
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index 0845194a78d..c6e8f3490a6 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -3015,7 +3015,7 @@ static void handleGlobalAttr(Sema &S, Decl *D, const AttributeList &Attr) {
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)
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index ad8b1b2ba5c..cde6d9dc752 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -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::checkThisInStaticMemberFunctionType(CXXMethodDecl *Method) {
// 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.
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index e4e0052424d..be169b6ecd1 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -10308,7 +10308,7 @@ void Sema::ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo,
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);
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp
index ac3f2efb5b8..5d282cb6fc5 100644
--- a/clang/lib/Sema/SemaLambda.cpp
+++ b/clang/lib/Sema/SemaLambda.cpp
@@ -1210,7 +1210,7 @@ static void addFunctionPointerConversion(Sema &S,
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 =
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index 554535dcf22..65ce405c55d 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -2712,7 +2712,7 @@ bool Sema::DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD,
Expr *&RetExpr,
AutoType *AT) {
TypeLoc OrigResultType = FD->getTypeSourceInfo()->getTypeLoc().
- IgnoreParens().castAs<FunctionProtoTypeLoc>().getResultLoc();
+ IgnoreParens().castAs<FunctionProtoTypeLoc>().getReturnLoc();
QualType Deduced;
if (RetExpr && isa<InitListExpr>(RetExpr)) {
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 37f6bb79ec2..93cb4833212 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -4368,13 +4368,13 @@ TreeTransform<Derived>::TransformFunctionProtoType(TypeLocBuilder &TLB,
// 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>::TransformFunctionNoProtoType(
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();
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 407051de1cc..d1b02c4b654 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -769,7 +769,7 @@ bool CursorVisitor::VisitFunctionDecl(FunctionDecl *ND) {
// 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::VisitAttributedTypeLoc(AttributedTypeLoc TL) {
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(VisitorWorkList &WL) {
return true;
} else {
// Visit result type.
- if (Visit(Proto.getResultLoc()))
+ if (Visit(Proto.getReturnLoc()))
return true;
}
}
OpenPOWER on IntegriCloud