summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/unreffun.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/unreffun.cxx')
-rw-r--r--compilerplugins/clang/unreffun.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/compilerplugins/clang/unreffun.cxx b/compilerplugins/clang/unreffun.cxx
index 0284d36ef87c..1dac4d7b276b 100644
--- a/compilerplugins/clang/unreffun.cxx
+++ b/compilerplugins/clang/unreffun.cxx
@@ -133,6 +133,14 @@ bool UnrefFun::VisitFunctionDecl(FunctionDecl const * decl) {
{
return true;
}
+ auto loc = decl->getLocation();
+ if (compiler.getSourceManager().isMacroBodyExpansion(loc)
+ && (Lexer::getImmediateMacroName(
+ loc, compiler.getSourceManager(), compiler.getLangOpts())
+ == "MDDS_MTV_DEFINE_ELEMENT_CALLBACKS"))
+ {
+ return true;
+ }
report(
DiagnosticsEngine::Warning,
(canon->isDefined()