[PATCH] Use FPT::getArgTypes() instead of manually building ArrayRefs
Richard Smith
richard at metafoo.co.uk
Mon Jun 10 12:46:41 PDT 2013
================
Comment at: lib/Sema/SemaLambda.cpp:814-815
@@ -813,7 +813,4 @@
ExtInfo.TypeQuals = 0;
- FunctionTy =
- S.Context.getFunctionType(Proto->getResultType(),
- ArrayRef<QualType>(Proto->arg_type_begin(),
- Proto->getNumArgs()),
- ExtInfo);
+ FunctionTy = S.Context
+ .getFunctionType(Proto->getResultType(), Proto->getArgTypes(), ExtInfo);
FunctionPtrTy = S.Context.getPointerType(FunctionTy);
----------------
Please split this after the first argument rather than before the dot.
================
Comment at: lib/Sema/SemaLambda.cpp:883-884
@@ -885,7 +882,4 @@
ExtInfo.TypeQuals = 0;
- QualType FunctionTy
- = S.Context.getFunctionType(Proto->getResultType(),
- ArrayRef<QualType>(Proto->arg_type_begin(),
- Proto->getNumArgs()),
- ExtInfo);
+ QualType FunctionTy = S.Context
+ .getFunctionType(Proto->getResultType(), Proto->getArgTypes(), ExtInfo);
BlockPtrTy = S.Context.getBlockPointerType(FunctionTy);
----------------
Likewise.
http://llvm-reviews.chandlerc.com/D947
BRANCH
proto-arg-ty-array-ref
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list