summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCast.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
commitf2ceec4811c3587056344dd5ef8d819261e256ad (patch)
treee3d713a6806e8f9b334df4a7083d82dfc5c06d79 /clang/lib/Sema/SemaCast.cpp
parenta6e4358f071e18aa969c0ae820745510b3581aff (diff)
downloadbcm5719-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/SemaCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCast.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp
index 8599fe09a5d..ccf10639bea 100644
--- a/clang/lib/Sema/SemaCast.cpp
+++ b/clang/lib/Sema/SemaCast.cpp
@@ -1277,7 +1277,7 @@ TryCastResult TryLValueToRValueCast(Sema &Self, Expr *SrcExpr,
}
Sema::ReferenceCompareResult RefResult = Self.CompareReferenceRelationship(
- SrcExpr->getLocStart(), ToType, FromType, DerivedToBase, ObjCConversion,
+ SrcExpr->getBeginLoc(), ToType, FromType, DerivedToBase, ObjCConversion,
ObjCLifetimeConversion);
if (RefResult != Sema::Ref_Compatible) {
if (CStyle || RefResult == Sema::Ref_Incompatible)
@@ -1294,7 +1294,7 @@ TryCastResult TryLValueToRValueCast(Sema &Self, Expr *SrcExpr,
Kind = CK_DerivedToBase;
CXXBasePaths Paths(/*FindAmbiguities=*/true, /*RecordPaths=*/true,
/*DetectVirtual=*/true);
- if (!Self.IsDerivedFrom(SrcExpr->getLocStart(), SrcExpr->getType(),
+ if (!Self.IsDerivedFrom(SrcExpr->getBeginLoc(), SrcExpr->getType(),
R->getPointeeType(), Paths))
return TC_NotApplicable;
@@ -2619,9 +2619,9 @@ void CastOperation::CheckCStyleCast() {
} else if (!SrcType->isArithmeticType()) {
if (!DestType->isIntegralType(Self.Context) &&
DestType->isArithmeticType()) {
- Self.Diag(SrcExpr.get()->getLocStart(),
- diag::err_cast_pointer_to_non_pointer_int)
- << DestType << SrcExpr.get()->getSourceRange();
+ Self.Diag(SrcExpr.get()->getBeginLoc(),
+ diag::err_cast_pointer_to_non_pointer_int)
+ << DestType << SrcExpr.get()->getSourceRange();
SrcExpr = ExprError();
return;
}
@@ -2630,8 +2630,8 @@ void CastOperation::CheckCStyleCast() {
if (Self.getLangOpts().OpenCL &&
!Self.getOpenCLOptions().isEnabled("cl_khr_fp16")) {
if (DestType->isHalfType()) {
- Self.Diag(SrcExpr.get()->getLocStart(), diag::err_opencl_cast_to_half)
- << DestType << SrcExpr.get()->getSourceRange();
+ Self.Diag(SrcExpr.get()->getBeginLoc(), diag::err_opencl_cast_to_half)
+ << DestType << SrcExpr.get()->getSourceRange();
SrcExpr = ExprError();
return;
}
@@ -2651,18 +2651,18 @@ void CastOperation::CheckCStyleCast() {
if (CastPtr->getPointeeType()->isObjCLifetimeType() &&
ExprPtr->getPointeeType()->isObjCLifetimeType() &&
!CastQuals.compatiblyIncludesObjCLifetime(ExprQuals)) {
- Self.Diag(SrcExpr.get()->getLocStart(),
+ Self.Diag(SrcExpr.get()->getBeginLoc(),
diag::err_typecheck_incompatible_ownership)
- << SrcType << DestType << Sema::AA_Casting
- << SrcExpr.get()->getSourceRange();
+ << SrcType << DestType << Sema::AA_Casting
+ << SrcExpr.get()->getSourceRange();
return;
}
}
}
else if (!Self.CheckObjCARCUnavailableWeakConversion(DestType, SrcType)) {
- Self.Diag(SrcExpr.get()->getLocStart(),
+ Self.Diag(SrcExpr.get()->getBeginLoc(),
diag::err_arc_convesion_of_weak_unavailable)
- << 1 << SrcType << DestType << SrcExpr.get()->getSourceRange();
+ << 1 << SrcType << DestType << SrcExpr.get()->getSourceRange();
SrcExpr = ExprError();
return;
}
@@ -2710,10 +2710,10 @@ static void DiagnoseCastQual(Sema &Self, const ExprResult &SrcExpr,
}
// This is a variant of int **x; const int **y = (const int **)x;
if (qualifiers == -1)
- Self.Diag(SrcExpr.get()->getLocStart(), diag::warn_cast_qual2)
+ Self.Diag(SrcExpr.get()->getBeginLoc(), diag::warn_cast_qual2)
<< SrcType << DestType;
else
- Self.Diag(SrcExpr.get()->getLocStart(), diag::warn_cast_qual)
+ Self.Diag(SrcExpr.get()->getBeginLoc(), diag::warn_cast_qual)
<< TheOffendingSrcType << TheOffendingDestType << qualifiers;
}
OpenPOWER on IntegriCloud