|
@@ -150,12 +150,16 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
|
|
|
return nullptr;
|
|
|
|
|
|
// If there are no registered plugins we don't need to wrap the consumer
|
|
|
- if (FrontendPluginRegistry::begin() == FrontendPluginRegistry::end())
|
|
|
- return Consumer;
|
|
|
-
|
|
|
- // Collect the list of plugins that go before the main action (in Consumers)
|
|
|
- // or after it (in AfterConsumers)
|
|
|
- std::vector<std::unique_ptr<ASTConsumer>> Consumers;
|
|
|
+ if (FrontendPluginRegistry::begin() == FrontendPluginRegistry::end())
|
|
|
+ return Consumer;
|
|
|
+
|
|
|
+ // If this is a code completion run, avoid invoking the plugin consumers
|
|
|
+ if (CI.hasCodeCompletionConsumer())
|
|
|
+ return Consumer;
|
|
|
+
|
|
|
+ // Collect the list of plugins that go before the main action (in Consumers)
|
|
|
+ // or after it (in AfterConsumers)
|
|
|
+ std::vector<std::unique_ptr<ASTConsumer>> Consumers;
|
|
|
std::vector<std::unique_ptr<ASTConsumer>> AfterConsumers;
|
|
|
for (FrontendPluginRegistry::iterator it = FrontendPluginRegistry::begin(),
|
|
|
ie = FrontendPluginRegistry::end();
|