================
@@ -273,6 +273,21 @@ void CommandMangler::operator()(tooling::CompileCommand 
&Command,
       SawInput(Cmd[I]);
     Cmd.resize(DashDashIndex);
   }
+
+  llvm::SmallVector<const char *, 16> UnsupportedArgs;
+
+  for (auto *UnknownArg : ArgList.filtered(options::OPT_UNKNOWN)) {
+    unsigned Index = UnknownArg->getIndex();
+    const auto *Argument = UnknownArg->getValue();
----------------
ArcsinX wrote:

Sorry, I gave your the wrong suggestion here. getValue() returns the option 
value (e.g. for `--foo=bar` it gives `bar`)

It looks like we can use getAsString(). Usage example can be found here 
https://github.com/llvm/llvm-project/blob/main/llvm/lib/Option/OptTable.cpp#L599

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

Reply via email to