summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/datamembershadow.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-10 12:35:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-08-10 15:14:03 +0200
commit3cc5149a84c7b8cfaf0deb2e2f6c88c72343ee28 (patch)
tree07bfda734ee36d2ca1dc83e2ac4a1c6ef3222691 /compilerplugins/clang/datamembershadow.cxx
parentd1a19ef614fd1bf115af15d3cb16e24150d4ceb7 (diff)
Avoid -Werror=deprecated-declarations with recent Clang trunk
...which first added alternative names to and then deprecated getLocBegin/End Change-Id: Iaefb8ce259057abfa6cd20f0b63c0ef2949a96b2 Reviewed-on: https://gerrit.libreoffice.org/58820 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/datamembershadow.cxx')
-rw-r--r--compilerplugins/clang/datamembershadow.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/datamembershadow.cxx b/compilerplugins/clang/datamembershadow.cxx
index 35c96c6f240f..2bb643d22a86 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -45,7 +45,7 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * fieldDecl)
return true;
}
StringRef aFileName = getFileNameOfSpellingLoc(
- compiler.getSourceManager().getSpellingLoc(fieldDecl->getLocStart()));
+ compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(fieldDecl)));
// FIXME complex stuff to fix later
@@ -97,13 +97,13 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * fieldDecl)
sPath += baseCXXRecordDecl->getNameAsString();
report(DiagnosticsEngine::Warning,
"data member %0 is shadowing member in superclass, through inheritance path %1",
- fieldDecl->getLocStart())
+ compat::getBeginLoc(fieldDecl))
<< fieldDecl->getName()
<< sPath
<< fieldDecl->getSourceRange();
report(DiagnosticsEngine::Note,
"superclass member here",
- baseFieldDecl->getLocStart())
+ compat::getBeginLoc(baseFieldDecl))
<< baseFieldDecl->getSourceRange();
}
return false;