diff options
author | Stephen Kelly <steveire@gmail.com> | 2018-08-09 21:08:08 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2018-08-09 21:08:08 +0000 |
commit | f2ceec4811c3587056344dd5ef8d819261e256ad (patch) | |
tree | e3d713a6806e8f9b334df4a7083d82dfc5c06d79 /clang/lib/Sema/SemaLambda.cpp | |
parent | a6e4358f071e18aa969c0ae820745510b3581aff (diff) | |
download | bcm5719-llvm-f2ceec4811c3587056344dd5ef8d819261e256ad.tar.gz bcm5719-llvm-f2ceec4811c3587056344dd5ef8d819261e256ad.zip |
Port getLocStart -> getBeginLoc
Reviewers: teemperor!
Subscribers: jholewinski, whisperity, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D50350
llvm-svn: 339385
Diffstat (limited to 'clang/lib/Sema/SemaLambda.cpp')
-rw-r--r-- | clang/lib/Sema/SemaLambda.cpp | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/clang/lib/Sema/SemaLambda.cpp b/clang/lib/Sema/SemaLambda.cpp index 440567e032e..dd979318d9c 100644 --- a/clang/lib/Sema/SemaLambda.cpp +++ b/clang/lib/Sema/SemaLambda.cpp @@ -479,7 +479,7 @@ void Sema::buildLambdaScope(LambdaScopeInfo *LSI, if (!LSI->ReturnType->isDependentType() && !LSI->ReturnType->isVoidType()) { - if (RequireCompleteType(CallOperator->getLocStart(), LSI->ReturnType, + if (RequireCompleteType(CallOperator->getBeginLoc(), LSI->ReturnType, diag::err_lambda_incomplete_result)) { // Do nothing. } @@ -720,10 +720,9 @@ void Sema::deduceClosureReturnType(CapturingScopeInfo &CSI) { // FIXME: This is a poor diagnostic for ReturnStmts without expressions. // TODO: It's possible that the *first* return is the divergent one. - Diag(RS->getLocStart(), + Diag(RS->getBeginLoc(), diag::err_typecheck_missing_return_type_incompatible) - << ReturnType << CSI.ReturnType - << isa<LambdaScopeInfo>(CSI); + << ReturnType << CSI.ReturnType << isa<LambdaScopeInfo>(CSI); // Continue iterating so that we keep emitting diagnostics. } } @@ -762,9 +761,9 @@ QualType Sema::buildLambdaInitCaptureInitialization(SourceLocation Loc, InitializationKind Kind = IsDirectInit ? (CXXDirectInit ? InitializationKind::CreateDirect( - Loc, Init->getLocStart(), Init->getLocEnd()) + Loc, Init->getBeginLoc(), Init->getLocEnd()) : InitializationKind::CreateDirectList(Loc)) - : InitializationKind::CreateCopy(Loc, Init->getLocStart()); + : InitializationKind::CreateCopy(Loc, Init->getBeginLoc()); MultiExprArg Args = Init; if (CXXDirectInit) @@ -1286,16 +1285,13 @@ static void addFunctionPointerConversion(Sema &S, for (unsigned I = 0, N = CallOperator->getNumParams(); I != N; ++I) { ParmVarDecl *From = CallOperator->getParamDecl(I); - InvokerParams.push_back(ParmVarDecl::Create(S.Context, - // Temporarily add to the TU. This is set to the invoker below. - S.Context.getTranslationUnitDecl(), - From->getLocStart(), - From->getLocation(), - From->getIdentifier(), - From->getType(), - From->getTypeSourceInfo(), - From->getStorageClass(), - /*DefaultArg=*/nullptr)); + InvokerParams.push_back(ParmVarDecl::Create( + S.Context, + // Temporarily add to the TU. This is set to the invoker below. + S.Context.getTranslationUnitDecl(), From->getBeginLoc(), + From->getLocation(), From->getIdentifier(), From->getType(), + From->getTypeSourceInfo(), From->getStorageClass(), + /*DefaultArg=*/nullptr)); CallOpConvTL.setParam(I, From); CallOpConvNameTL.setParam(I, From); } @@ -1747,14 +1743,11 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation, SmallVector<ParmVarDecl *, 4> BlockParams; for (unsigned I = 0, N = CallOperator->getNumParams(); I != N; ++I) { ParmVarDecl *From = CallOperator->getParamDecl(I); - BlockParams.push_back(ParmVarDecl::Create(Context, Block, - From->getLocStart(), - From->getLocation(), - From->getIdentifier(), - From->getType(), - From->getTypeSourceInfo(), - From->getStorageClass(), - /*DefaultArg=*/nullptr)); + BlockParams.push_back(ParmVarDecl::Create( + Context, Block, From->getBeginLoc(), From->getLocation(), + From->getIdentifier(), From->getType(), From->getTypeSourceInfo(), + From->getStorageClass(), + /*DefaultArg=*/nullptr)); } Block->setParams(BlockParams); |