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
This commit is contained in:
@@ -159,6 +159,11 @@ DiagnosticBuilder PluginHandler::report( DiagnosticsEngine::Level level, StringR
|
||||
return report( level, nullptr, message, compiler, loc );
|
||||
}
|
||||
|
||||
bool PluginHandler::addRemoval( SourceLocation loc )
|
||||
{
|
||||
return removals.insert( loc ).second;
|
||||
}
|
||||
|
||||
void PluginHandler::HandleTranslationUnit( ASTContext& context )
|
||||
{
|
||||
if( context.getDiagnostics().hasErrorOccurred())
|
||||
|
Reference in New Issue
Block a user