Let new test from r350340 still pass even after r350451.
authorNico Weber <nicolasweber@gmx.de>
Sat, 5 Jan 2019 01:19:14 +0000 (01:19 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sat, 5 Jan 2019 01:19:14 +0000 (01:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350453 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/FrontendAction.cpp

index a1866e48cc46bfe8253e162fb098b6fd7a09d0f5..f5226380b4dd5c083107087a5425c41ad8d75659 100644 (file)
@@ -152,10 +152,6 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
   if (!Consumer)
     return nullptr;
 
-  // If there are no registered plugins we don't need to wrap the consumer
-  if (FrontendPluginRegistry::begin() == FrontendPluginRegistry::end())
-    return Consumer;
-
   // Validate -add-plugin args.
   bool FoundAllPlugins = true;
   for (const std::string &Arg : CI.getFrontendOpts().AddPluginActions) {
@@ -174,6 +170,10 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
   if (!FoundAllPlugins)
     return nullptr;
 
+  // If there are no registered plugins we don't need to wrap the consumer
+  if (FrontendPluginRegistry::begin() == FrontendPluginRegistry::end())
+    return Consumer;
+
   // If this is a code completion run, avoid invoking the plugin consumers
   if (CI.hasCodeCompletionConsumer())
     return Consumer;