diff options
author | Alp Toker <alp@nuanti.com> | 2014-01-20 20:26:09 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-01-20 20:26:09 +0000 |
commit | c50bf3d128af641f9249f7d1dc37e42b9fd31b81 (patch) | |
tree | 82cb9d4ca1cc715bbf62f39de4b4e27d8b705beb /include/clang/AST/CanonicalType.h | |
parent | 55c1c8ac7914747a84329aab72200822b8e8b5c2 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/CanonicalType.h')
-rw-r--r-- | include/clang/AST/CanonicalType.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/clang/AST/CanonicalType.h b/include/clang/AST/CanonicalType.h index 9c699b7e0a..d7592e964b 100644 --- a/include/clang/AST/CanonicalType.h +++ b/include/clang/AST/CanonicalType.h @@ -557,23 +557,23 @@ struct CanProxyAdaptor<FunctionProtoType> : public CanProxyBase<FunctionProtoType> { LLVM_CLANG_CANPROXY_TYPE_ACCESSOR(getResultType) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(FunctionType::ExtInfo, getExtInfo) - LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getNumArgs) - CanQualType getArgType(unsigned i) const { - return CanQualType::CreateUnsafe(this->getTypePtr()->getArgType(i)); + LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getNumParams) + CanQualType getParamType(unsigned i) const { + return CanQualType::CreateUnsafe(this->getTypePtr()->getParamType(i)); } LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(bool, isVariadic) LLVM_CLANG_CANPROXY_SIMPLE_ACCESSOR(unsigned, getTypeQuals) - typedef CanTypeIterator<FunctionProtoType::arg_type_iterator> - arg_type_iterator; + typedef CanTypeIterator<FunctionProtoType::param_type_iterator> + param_type_iterator; - arg_type_iterator arg_type_begin() const { - return arg_type_iterator(this->getTypePtr()->arg_type_begin()); + param_type_iterator param_type_begin() const { + return param_type_iterator(this->getTypePtr()->param_type_begin()); } - arg_type_iterator arg_type_end() const { - return arg_type_iterator(this->getTypePtr()->arg_type_end()); + param_type_iterator param_type_end() const { + return param_type_iterator(this->getTypePtr()->param_type_end()); } // Note: canonical function types never have exception specifications |