================
@@ -8065,6 +8069,9 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID 
InputType,
    CmdArgs.push_back("-fno-wchar");
  }
 
+ if (!types::isCXX(InputType) && Args.hasArg(options::OPT_fms_define_stdc))
+   CmdArgs.push_back("-fms-define-stdc");
----------------
MaxEW707 wrote:

This can be deleted. Since `/Zc:__STDC__` is aliased to `fms-define-stdc` this 
is already handled in the code above.
`AddClangCLArgs` is intended to handle cl.exe options that are not aliased.

If you want `-fms-define-stdc` to be usable when in CL mode then you can add 
`CLOption` to the visibility as I mentioned above in `Options.td`.

My preference is to remove this code and just add `CLOption`.

See `Option::accept` inside `Option.cpp` for where aliased args are turned into 
the argument they alias.

https://github.com/llvm/llvm-project/pull/68690
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to