summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2018-08-09 21:08:08 +0000
committerStephen Kelly <steveire@gmail.com>2018-08-09 21:08:08 +0000
commitd7b659b592e6aaa6659904d346a0cacfa18d1661 (patch)
treee6b7f265e398995b32ffd8352dc00cd3c837f408 /lib/Sema/SemaDeclObjC.cpp
parenta7d278685d70b3cf693b12941cae4bba91d260d6 (diff)
downloadclang-d7b659b592e6aaa6659904d346a0cacfa18d1661.tar.gz
Port getLocStart -> getBeginLoc
Reviewers: teemperor! Subscribers: jholewinski, whisperity, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50350 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339385 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index a45d7c89a2..f6a18e0e8b 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -717,21 +717,22 @@ DeclResult Sema::actOnObjCTypeParam(Scope *S,
if (auto attr = qual.getAs<AttributedTypeLoc>()) {
rangeToRemove = attr.getLocalSourceRange();
if (attr.getTypePtr()->getImmediateNullability()) {
- Diag(attr.getLocStart(),
+ Diag(attr.getBeginLoc(),
diag::err_objc_type_param_bound_explicit_nullability)
- << paramName << typeBound
- << FixItHint::CreateRemoval(rangeToRemove);
+ << paramName << typeBound
+ << FixItHint::CreateRemoval(rangeToRemove);
diagnosed = true;
}
}
}
if (!diagnosed) {
- Diag(qual ? qual.getLocStart()
- : typeBoundInfo->getTypeLoc().getLocStart(),
- diag::err_objc_type_param_bound_qualified)
- << paramName << typeBound << typeBound.getQualifiers().getAsString()
- << FixItHint::CreateRemoval(rangeToRemove);
+ Diag(qual ? qual.getBeginLoc()
+ : typeBoundInfo->getTypeLoc().getBeginLoc(),
+ diag::err_objc_type_param_bound_qualified)
+ << paramName << typeBound
+ << typeBound.getQualifiers().getAsString()
+ << FixItHint::CreateRemoval(rangeToRemove);
}
// If the type bound has qualifiers other than CVR, we need to strip
@@ -865,7 +866,7 @@ static bool checkTypeParamListConsistency(Sema &S,
// Diagnose the conflict and update the second declaration.
SourceLocation diagLoc = newTypeParam->getVarianceLoc();
if (diagLoc.isInvalid())
- diagLoc = newTypeParam->getLocStart();
+ diagLoc = newTypeParam->getBeginLoc();
auto diag = S.Diag(diagLoc,
diag::err_objc_type_param_variance_conflict)
@@ -886,7 +887,7 @@ static bool checkTypeParamListConsistency(Sema &S,
: "__contravariant";
if (newTypeParam->getVariance()
== ObjCTypeParamVariance::Invariant) {
- diag << FixItHint::CreateInsertion(newTypeParam->getLocStart(),
+ diag << FixItHint::CreateInsertion(newTypeParam->getBeginLoc(),
(newVarianceStr + " ").str());
} else {
diag << FixItHint::CreateReplacement(newTypeParam->getVarianceLoc(),
@@ -2164,9 +2165,10 @@ void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl,
} else if (ImplIvar->isBitField() && ClsIvar->isBitField() &&
ImplIvar->getBitWidthValue(Context) !=
ClsIvar->getBitWidthValue(Context)) {
- Diag(ImplIvar->getBitWidth()->getLocStart(),
- diag::err_conflicting_ivar_bitwidth) << ImplIvar->getIdentifier();
- Diag(ClsIvar->getBitWidth()->getLocStart(),
+ Diag(ImplIvar->getBitWidth()->getBeginLoc(),
+ diag::err_conflicting_ivar_bitwidth)
+ << ImplIvar->getIdentifier();
+ Diag(ClsIvar->getBitWidth()->getBeginLoc(),
diag::note_previous_definition);
}
// Make sure the names are identical.
@@ -2206,7 +2208,7 @@ static void WarnUndefinedMethod(Sema &S, SourceLocation ImpLoc,
}
// Issue a note to the original declaration.
- SourceLocation MethodLoc = method->getLocStart();
+ SourceLocation MethodLoc = method->getBeginLoc();
if (MethodLoc.isValid())
S.Diag(MethodLoc, diag::note_method_declared_at) << method;
}
@@ -3580,12 +3582,12 @@ void Sema::DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl<ObjCMethodDecl*> &
else
Diag(R.getBegin(), diag::warn_multiple_method_decl) << Sel << R;
- Diag(Methods[0]->getLocStart(),
+ Diag(Methods[0]->getBeginLoc(),
issueError ? diag::note_possibility : diag::note_using)
- << Methods[0]->getSourceRange();
+ << Methods[0]->getSourceRange();
for (unsigned I = 1, N = Methods.size(); I != N; ++I) {
- Diag(Methods[I]->getLocStart(), diag::note_also_found)
- << Methods[I]->getSourceRange();
+ Diag(Methods[I]->getBeginLoc(), diag::note_also_found)
+ << Methods[I]->getSourceRange();
}
}
}
@@ -4485,7 +4487,7 @@ static void checkObjCMethodX86VectorTypes(Sema &SemaRef,
QualType T;
for (const ParmVarDecl *P : Method->parameters()) {
if (P->getType()->isVectorType()) {
- Loc = P->getLocStart();
+ Loc = P->getBeginLoc();
T = P->getType();
break;
}