summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/sallogareas.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/sallogareas.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/sallogareas.cxx')
-rw-r--r--compilerplugins/clang/sallogareas.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/compilerplugins/clang/sallogareas.cxx b/compilerplugins/clang/sallogareas.cxx
index e18f100043e5..9100b8973f00 100644
--- a/compilerplugins/clang/sallogareas.cxx
+++ b/compilerplugins/clang/sallogareas.cxx
@@ -80,7 +80,7 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call )
// from the same macro should be the same).
if( kind == LogCallKind::Sal )
{
- SourceLocation expansionLocation = compiler.getSourceManager().getExpansionLoc( call->getLocStart());
+ SourceLocation expansionLocation = compiler.getSourceManager().getExpansionLoc( compat::getBeginLoc(call));
if( expansionLocation == lastSalDetailLogStreamMacro )
return true;
lastSalDetailLogStreamMacro = expansionLocation;
@@ -91,7 +91,7 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call )
checkArea( area->getBytes(), area->getExprLoc());
else
report( DiagnosticsEngine::Warning, "unsupported string literal kind (plugin needs fixing?)",
- area->getLocStart());
+ compat::getBeginLoc(area));
return true;
}
if( loplugin::DeclCheck(inFunction).Function("log").Namespace("detail").Namespace("sal").GlobalNamespace()
@@ -101,7 +101,7 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call )
Expr::NPC_ValueDependentIsNotNull ) != Expr::NPCK_NotNull )
{ // If the area argument is a null pointer, that is allowed only for SAL_DEBUG.
const SourceManager& source = compiler.getSourceManager();
- for( SourceLocation loc = call->getLocStart();
+ for( SourceLocation loc = compat::getBeginLoc(call);
loc.isMacroID();
loc = compat::getImmediateExpansionRange(source, loc ).first )
{
@@ -110,11 +110,11 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call )
return true; // ok
}
report( DiagnosticsEngine::Warning, "missing log area",
- call->getArg( 1 )->IgnoreParenImpCasts()->getLocStart());
+ compat::getBeginLoc(call->getArg( 1 )->IgnoreParenImpCasts()));
return true;
}
report( DiagnosticsEngine::Warning, "cannot analyse log area argument (plugin needs fixing?)",
- call->getLocStart());
+ compat::getBeginLoc(call));
return true;
}