diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-12 11:14:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-12 12:41:01 +0200 |
commit | 85cf4d25a3df3da86840c69bc035d58212a9672c (patch) | |
tree | b8396222ee62d9192d83550f95276a7e008fca82 /compilerplugins/clang/mergeclasses.cxx | |
parent | 0d7193bd2cd2f1bd24232095d7617f0764c58a9b (diff) |
loplugin:mergeclasses fix ignoring some stuff
Seems that calling getCanonicalDecl here results in us sometimes picking
up forward-decl's, which hides stuff
Also make the python processing code spit out a message if I manage to
mess up the log files
Change-Id: I08bf50eb26cf463c126507b51535b0a0fc9f7ecf
Diffstat (limited to 'compilerplugins/clang/mergeclasses.cxx')
-rw-r--r-- | compilerplugins/clang/mergeclasses.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/mergeclasses.cxx b/compilerplugins/clang/mergeclasses.cxx index ca6cdeac74be..6035e7c275dc 100644 --- a/compilerplugins/clang/mergeclasses.cxx +++ b/compilerplugins/clang/mergeclasses.cxx @@ -148,7 +148,7 @@ bool MergeClasses::VisitCXXRecordDecl(const CXXRecordDecl* decl) } if (decl->isThisDeclarationADefinition()) { - SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(decl->getCanonicalDecl()->getLocStart()); + SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(decl->getLocStart()); std::string filename = compiler.getSourceManager().getFilename(spellingLocation); filename = filename.substr(strlen(SRCDIR)); std::string s = decl->getQualifiedNameAsString(); |