summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-12-18 09:37:44 +0200
committerNoel Grandin <noel@peralex.com>2015-12-21 10:20:31 +0200
commite18b08363a939b35e7f5dc435e606d2c62bddebd (patch)
tree6318e03a67fd2dfbbd29b88b3de36ad7e9fd6292 /compilerplugins
parent20ff8cc5c3534d149b18b9776ab964324e70fdfd (diff)
loplugin:unusedmethods
Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unusedmethods.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx
index 3a9209b69b2b..8df33265a2ab 100644
--- a/compilerplugins/clang/unusedmethods.cxx
+++ b/compilerplugins/clang/unusedmethods.cxx
@@ -255,7 +255,7 @@ bool UnusedMethods::VisitFunctionDecl( const FunctionDecl* functionDecl )
return true;
}
- if( !ignoreLocation( functionDecl ))
+ if( functionDecl->getLocation().isValid() && !ignoreLocation( functionDecl ))
definitionSet.insert(niceName(functionDecl));
return true;
}