From 43465bf3fd6cca715187ee7286c881cb210fc3c4 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 9 Aug 2018 22:42:26 +0000 Subject: 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 --- clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp') diff --git a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp index 8ed6b90773a..b1ceea11d37 100644 --- a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp +++ b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp @@ -73,7 +73,7 @@ public: // is already nested NestingThreshold levels deep, record the start location // of this new compound statement. if (CurrentNestingLevel == Info.NestingThreshold) - Info.NestingThresholders.push_back(Node->getLocStart()); + Info.NestingThresholders.push_back(Node->getBeginLoc()); ++CurrentNestingLevel; Base::TraverseCompoundStmt(Node); @@ -162,9 +162,9 @@ void FunctionSizeCheck::check(const MatchFinder::MatchResult &Result) { // Count the lines including whitespace and comments. Really simple. if (const Stmt *Body = Func->getBody()) { SourceManager *SM = Result.SourceManager; - if (SM->isWrittenInSameFile(Body->getLocStart(), Body->getLocEnd())) { + if (SM->isWrittenInSameFile(Body->getBeginLoc(), Body->getLocEnd())) { FI.Lines = SM->getSpellingLineNumber(Body->getLocEnd()) - - SM->getSpellingLineNumber(Body->getLocStart()); + SM->getSpellingLineNumber(Body->getBeginLoc()); } } -- cgit v1.2.3