summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-01-20 20:26:09 +0000
committerAlp Toker <alp@nuanti.com>2014-01-20 20:26:09 +0000
commit9cacbabd33eea88e9c416e4bc8abf58eebf5589d (patch)
tree74755c65f472ae14b820aa71f77069e69a1a91c4 /clang/lib/Sema/TreeTransform.h
parent8ff1610f06646b0f62060df06c194214bd992260 (diff)
downloadbcm5719-llvm-9cacbabd33eea88e9c416e4bc8abf58eebf5589d.tar.gz
bcm5719-llvm-9cacbabd33eea88e9c416e4bc8abf58eebf5589d.zip
Rename FunctionProtoType accessors from 'arguments' to 'parameters'
Fix a perennial source of confusion in the clang type system: Declarations and function prototypes have parameters to which arguments are supplied, so calling these 'arguments' was a stretch even in C mode, let alone C++ where default arguments, templates and overloading make the distinction important to get right. Readability win across the board, especially in the casting, ADL and overloading implementations which make a lot more sense at a glance now. Will keep an eye on the builders and update dependent projects shortly. No functional change. llvm-svn: 199686
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r--clang/lib/Sema/TreeTransform.h24
1 files changed, 10 insertions, 14 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 36a6520fcd0..97f4a4f4548 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -4356,11 +4356,9 @@ TreeTransform<Derived>::TransformFunctionProtoType(TypeLocBuilder &TLB,
QualType ResultType;
if (T->hasTrailingReturn()) {
- if (getDerived().TransformFunctionTypeParams(TL.getBeginLoc(),
- TL.getParmArray(),
- TL.getNumArgs(),
- TL.getTypePtr()->arg_type_begin(),
- ParamTypes, &ParamDecls))
+ if (getDerived().TransformFunctionTypeParams(
+ TL.getBeginLoc(), TL.getParmArray(), TL.getNumArgs(),
+ TL.getTypePtr()->param_type_begin(), ParamTypes, &ParamDecls))
return QualType();
{
@@ -4382,21 +4380,19 @@ TreeTransform<Derived>::TransformFunctionProtoType(TypeLocBuilder &TLB,
if (ResultType.isNull())
return QualType();
- if (getDerived().TransformFunctionTypeParams(TL.getBeginLoc(),
- TL.getParmArray(),
- TL.getNumArgs(),
- TL.getTypePtr()->arg_type_begin(),
- ParamTypes, &ParamDecls))
+ if (getDerived().TransformFunctionTypeParams(
+ TL.getBeginLoc(), TL.getParmArray(), TL.getNumArgs(),
+ TL.getTypePtr()->param_type_begin(), ParamTypes, &ParamDecls))
return QualType();
}
// FIXME: Need to transform the exception-specification too.
QualType Result = TL.getType();
- if (getDerived().AlwaysRebuild() ||
- ResultType != T->getResultType() ||
- T->getNumArgs() != ParamTypes.size() ||
- !std::equal(T->arg_type_begin(), T->arg_type_end(), ParamTypes.begin())) {
+ if (getDerived().AlwaysRebuild() || ResultType != T->getResultType() ||
+ T->getNumParams() != ParamTypes.size() ||
+ !std::equal(T->param_type_begin(), T->param_type_end(),
+ ParamTypes.begin())) {
Result = getDerived().RebuildFunctionProtoType(ResultType, ParamTypes,
T->getExtProtoInfo());
if (Result.isNull())
OpenPOWER on IntegriCloud