Port getLocStart -> getBeginLoc
Reviewers: javed.absar
Subscribers: nemanjai, kbarton, ilya-biryukov, ioeric, jkorous, arphaman, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D50354
llvm-svn: 339400
diff --git a/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp b/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
index 90398cc..759c3f0 100644
--- a/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
+++ b/clang-tools-extra/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
@@ -81,7 +81,7 @@
if (declRef && isCatchVariable(declRef)) {
return;
}
- diag(subExpr->getLocStart(), "throw expression throws a pointer; it should "
+ diag(subExpr->getBeginLoc(), "throw expression throws a pointer; it should "
"throw a non-pointer value instead");
}
// If the throw statement does not throw by pointer then it throws by value
@@ -124,7 +124,7 @@
}
}
if (emit)
- diag(subExpr->getLocStart(),
+ diag(subExpr->getBeginLoc(),
"throw expression should throw anonymous temporary values instead");
}
}
@@ -144,7 +144,7 @@
// We do not diagnose when catching pointer to strings since we also allow
// throwing string literals.
if (!PT->getPointeeType()->isAnyCharacterType())
- diag(varDecl->getLocStart(), diagMsgCatchReference);
+ diag(varDecl->getBeginLoc(), diagMsgCatchReference);
} else if (!caughtType->isReferenceType()) {
const char *diagMsgCatchReference = "catch handler catches by value; "
"should catch by reference instead";
@@ -152,7 +152,7 @@
// value". In this case we should emit a diagnosis message unless the type
// is trivial.
if (!caughtType.isTrivialType(context))
- diag(varDecl->getLocStart(), diagMsgCatchReference);
+ diag(varDecl->getBeginLoc(), diagMsgCatchReference);
}
}