Skip to content

Commit c25bea5

Browse files
[NFC] Remove unnecessary loop over function parameter types.
1 parent 3cc452e commit c25bea5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/AST/ClangTypeConverter.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,13 @@ const clang::Type *ClangTypeConverter::getFunctionType(
118118
ArrayRef<AnyFunctionType::Param> params, Type resultTy,
119119
AnyFunctionType::Representation repr) {
120120

121-
SmallVector<Type, 4> paramsTy;
122-
for (auto p : params)
123-
paramsTy.push_back(p.getPlainType());
124-
125121
auto resultClangTy = convert(resultTy);
126122
if (resultClangTy.isNull())
127123
return nullptr;
128124

129125
SmallVector<clang::QualType, 8> paramsClangTy;
130-
for (auto p : paramsTy) {
131-
auto pc = convert(p);
126+
for (auto p : params) {
127+
auto pc = convert(p.getPlainType());
132128
if (pc.isNull())
133129
return nullptr;
134130
paramsClangTy.push_back(pc);

0 commit comments

Comments
 (0)