summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2018-08-09 22:42:26 +0000
committerStephen Kelly <steveire@gmail.com>2018-08-09 22:42:26 +0000
commit43465bf3fd6cca715187ee7286c881cb210fc3c4 (patch)
treec2aad6e9cadd0b7164c476722704660c4b84b5e5 /clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
parentd54b7f059290102b0ff007843ecf0668e833c118 (diff)
downloadbcm5719-llvm-43465bf3fd6cca715187ee7286c881cb210fc3c4.tar.gz
bcm5719-llvm-43465bf3fd6cca715187ee7286c881cb210fc3c4.zip
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
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp b/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
index 45c5b706110..9f03f7d5ac2 100644
--- a/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
@@ -48,15 +48,15 @@ void GlobalNamesInHeadersCheck::registerMatchers(
void GlobalNamesInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
const auto *D = Result.Nodes.getNodeAs<Decl>("using_decl");
// If it comes from a macro, we'll assume it is fine.
- if (D->getLocStart().isMacroID())
+ if (D->getBeginLoc().isMacroID())
return;
// Ignore if it comes from the "main" file ...
if (Result.SourceManager->isInMainFile(
- Result.SourceManager->getExpansionLoc(D->getLocStart()))) {
+ Result.SourceManager->getExpansionLoc(D->getBeginLoc()))) {
// unless that file is a header.
if (!utils::isSpellingLocInHeaderFile(
- D->getLocStart(), *Result.SourceManager, HeaderFileExtensions))
+ D->getBeginLoc(), *Result.SourceManager, HeaderFileExtensions))
return;
}
@@ -70,7 +70,7 @@ void GlobalNamesInHeadersCheck::check(const MatchFinder::MatchResult &Result) {
}
}
- diag(D->getLocStart(),
+ diag(D->getBeginLoc(),
"using declarations in the global namespace in headers are prohibited");
}
OpenPOWER on IntegriCloud