diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-02-03 14:08:32 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-02-03 16:33:01 +0100 |
commit | 512cb39ffc646e7126533d782482621a806e825d (patch) | |
tree | c4559552f46196bdd1e6071a4270ca98a8dbd43b /compilerplugins | |
parent | f905cea1b9d3730cb84cd2198976e74c3469f65a (diff) |
handle -Wunused-function warnings in clang's sharedvisitor.cxx
Change-Id: I5fbf7da1da8c1c5b33e008e30898ca5d2cdfde65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87870
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/sharedvisitor/generator.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compilerplugins/clang/sharedvisitor/generator.cxx b/compilerplugins/clang/sharedvisitor/generator.cxx index b94083aaa304..62c0798a4801 100644 --- a/compilerplugins/clang/sharedvisitor/generator.cxx +++ b/compilerplugins/clang/sharedvisitor/generator.cxx @@ -296,6 +296,16 @@ void generateVisitor( PluginType type ) output << " --activeRefCount;\n"; output << " " << plugin.variableName << " = save" << plugin.className << ";\n"; } + output << " if( false ) // silence -Wunused-function warnings\n"; + output << " {\n"; + for( const PluginInfo& plugin : plugins[ type ] ) + { + auto pluginTraverse = plugin.traverseFunctions.find( traverse ); + if( pluginTraverse == plugin.traverseFunctions.end()) + continue; + output << " " << plugin.variableName << "->" << pluginTraverse->name << "( arg );\n"; + } + output << " }\n"; output << " return ret;\n"; output << " }\n"; } |