diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-10-22 04:59:59 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-10-22 04:59:59 +0000 |
commit | b5518246b25cf6f3fd8ccc2aaef8b943ae292f9c (patch) | |
tree | 6320f2e7e8d21f543ca5b6225b69c92feac98c47 /clang/lib/Sema/TreeTransform.h | |
parent | a9247eb2b14198d6a87265fa824810fbb89b3589 (diff) | |
download | bcm5719-llvm-b5518246b25cf6f3fd8ccc2aaef8b943ae292f9c.tar.gz bcm5719-llvm-b5518246b25cf6f3fd8ccc2aaef8b943ae292f9c.zip |
Use an ArrayRef<OffsetOfComponent> instead of pointer and size throughout offsetof handling code. Also use a range-based for loop. NFC
llvm-svn: 250989
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 513c6285e96..29073debcd7 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -1850,12 +1850,11 @@ public: /// By default, performs semantic analysis to build the new expression. /// Subclasses may override this routine to provide different behavior. ExprResult RebuildOffsetOfExpr(SourceLocation OperatorLoc, - TypeSourceInfo *Type, - Sema::OffsetOfComponent *Components, - unsigned NumComponents, - SourceLocation RParenLoc) { + TypeSourceInfo *Type, + ArrayRef<Sema::OffsetOfComponent> Components, + SourceLocation RParenLoc) { return getSema().BuildBuiltinOffsetOf(OperatorLoc, Type, Components, - NumComponents, RParenLoc); + RParenLoc); } /// \brief Build a new sizeof, alignof or vec_step expression with a @@ -7816,8 +7815,7 @@ TreeTransform<Derived>::TransformOffsetOfExpr(OffsetOfExpr *E) { // Build a new offsetof expression. return getDerived().RebuildOffsetOfExpr(E->getOperatorLoc(), Type, - Components.data(), Components.size(), - E->getRParenLoc()); + Components, E->getRParenLoc()); } template<typename Derived> |