summaryrefslogtreecommitdiffstats
path: root/compilerplugins/clang/returnconstant.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/returnconstant.cxx')
-rw-r--r--compilerplugins/clang/returnconstant.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/compilerplugins/clang/returnconstant.cxx b/compilerplugins/clang/returnconstant.cxx
index 1f50aee860f9..530044c9609d 100644
--- a/compilerplugins/clang/returnconstant.cxx
+++ b/compilerplugins/clang/returnconstant.cxx
@@ -44,11 +44,11 @@ public:
continue;
report(DiagnosticsEngine::Warning,
"Method only returns a single constant value %0, does it make sense?",
- compat::getBeginLoc(functionDecl))
+ functionDecl->getBeginLoc())
<< pair.second << functionDecl->getSourceRange();
if (functionDecl != functionDecl->getCanonicalDecl())
report(DiagnosticsEngine::Note, "decl here",
- compat::getBeginLoc(functionDecl->getCanonicalDecl()))
+ functionDecl->getCanonicalDecl()->getBeginLoc())
<< functionDecl->getCanonicalDecl()->getSourceRange();
}
}
@@ -118,12 +118,11 @@ bool ReturnConstant::TraverseCXXMethodDecl(CXXMethodDecl* functionDecl)
return true;
// ignore LINK macro stuff
- if (compiler.getSourceManager().isMacroBodyExpansion(compat::getBeginLoc(functionDecl))
- || compiler.getSourceManager().isMacroArgExpansion(compat::getBeginLoc(functionDecl)))
+ if (compiler.getSourceManager().isMacroBodyExpansion(functionDecl->getBeginLoc())
+ || compiler.getSourceManager().isMacroArgExpansion(functionDecl->getBeginLoc()))
{
- StringRef name{ Lexer::getImmediateMacroName(compat::getBeginLoc(functionDecl),
- compiler.getSourceManager(),
- compiler.getLangOpts()) };
+ StringRef name{ Lexer::getImmediateMacroName(
+ functionDecl->getBeginLoc(), compiler.getSourceManager(), compiler.getLangOpts()) };
if (name.find("IMPL_LINK") != StringRef::npos
|| name.find("IMPL_STATIC_LINK") != StringRef::npos
|| name.find("DECL_LINK") != StringRef::npos