================
@@ -341,8 +360,13 @@ void CommandMangler::operator()(tooling::CompileCommand 
&Command,
   });
 
   std::vector<std::string> ToAppend;
-  if (ResourceDir && !HasExact("-resource-dir") && 
!HasPrefix("-resource-dir="))
-    ToAppend.push_back(("-resource-dir=" + *ResourceDir));
+  if (!HasExact("-resource-dir") && !HasPrefix("-resource-dir=")) {
+    if (ResourceDir) {
+      ToAppend.push_back(("-resource-dir=" + *ResourceDir));
+    } else {
+      elog("No valid -resource-dir option");
+    }
+  }
----------------
ArcsinX wrote:

I think we should not change `CommandMangler::operator()`. This calls quite 
often and will spam a user with not very informative message.

https://github.com/llvm/llvm-project/pull/203332
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to