summaryrefslogtreecommitdiffstats
path: root/compilerplugins/clang/pluginhandler.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-20 19:47:01 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-20 19:51:43 +0100
commit5dcb634dcbc5816e4b61e14ce2f05395e52ac5bf (patch)
tree5e2e534959d793e9fa6e4d2831b208cc7e633cc1 /compilerplugins/clang/pluginhandler.hxx
parentvcl: fix Mac build a little more (diff)
downloadcore-5dcb634dcbc5816e4b61e14ce2f05395e52ac5bf.tar.gz
core-5dcb634dcbc5816e4b61e14ce2f05395e52ac5bf.zip
Don't attempt to actually do double code removals
...that easily works around the problem that in a rewriter rewriting types of VarDecls like T x, y; it would try to replace T twice. Also, keep the list of removals globally with the (global) rewriter. Change-Id: I55b8d11986c2a29e09ff40132fd114a0cc48dc90
Diffstat (limited to 'compilerplugins/clang/pluginhandler.hxx')
-rw-r--r--compilerplugins/clang/pluginhandler.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/compilerplugins/clang/pluginhandler.hxx b/compilerplugins/clang/pluginhandler.hxx
index dcfac71abdee..48cee8e4a402 100644
--- a/compilerplugins/clang/pluginhandler.hxx
+++ b/compilerplugins/clang/pluginhandler.hxx
@@ -14,6 +14,8 @@
#include "plugin.hxx"
+#include <set>
+
#include <clang/AST/ASTConsumer.h>
#include <clang/Frontend/FrontendAction.h>
@@ -33,12 +35,14 @@ class PluginHandler
static void registerPlugin( Plugin* (*create)( const Plugin::InstantiationData& ), const char* optionName, bool isPPCallback, bool byDefault );
DiagnosticBuilder report( DiagnosticsEngine::Level level, const char * plugin, StringRef message,
CompilerInstance& compiler, SourceLocation loc = SourceLocation());
+ bool addRemoval( SourceLocation loc );
private:
void handleOption( const string& option );
void createPlugins( set< string > rewriters );
DiagnosticBuilder report( DiagnosticsEngine::Level level, StringRef message, SourceLocation loc = SourceLocation());
CompilerInstance& compiler;
Rewriter rewriter;
+ set< SourceLocation > removals;
string scope;
string warningsOnly;
};