summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-24 08:09:24 +0200
committerNoel Grandin <noel@peralex.com>2015-11-24 08:09:24 +0200
commitacc4acb9ca3536c3f6d16cfc9bfac8587d57a112 (patch)
treefd4d976366e6ac9f27f6f8e699cd237e9036de2c /compilerplugins
parent872d209bc62aab6a27a7a92734d1670b6e20adbf (diff)
loplugin:unusedfields in tools/
Change-Id: Ic460bf42cbcf356cdcebbd5060a0dad3d3caa4ef
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/unusedfields.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/clang/unusedfields.cxx b/compilerplugins/clang/unusedfields.cxx
index d00235674370..3d4abe79fa34 100644
--- a/compilerplugins/clang/unusedfields.cxx
+++ b/compilerplugins/clang/unusedfields.cxx
@@ -169,6 +169,7 @@ gotfunc:
bool UnusedFields::VisitFieldDecl( const FieldDecl* fieldDecl )
{
fieldDecl = fieldDecl->getCanonicalDecl();
+ const FieldDecl* canonicalDecl = fieldDecl;
if( ignoreLocation( fieldDecl ))
return true;
@@ -212,7 +213,7 @@ bool UnusedFields::VisitFieldDecl( const FieldDecl* fieldDecl )
return true;
}
- definitionSet.insert(niceName(fieldDecl));
+ definitionSet.insert(niceName(canonicalDecl));
return true;
}