================ @@ -1256,6 +1256,14 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA, if (Arg *A = Args.getLastArg(options::OPT_I_)) D.Diag(diag::err_drv_I_dash_not_supported) << A->getAsString(Args); + if (Arg *A = Args.getLastArg(options::OPT_stdlib_hardening_EQ)) { + if (types::isCXX(Inputs[0].getType()) && ---------------- MaskRay wrote:
If a project mixes C and C++, and I want to use one option, `-D_LIBCPP_HARDENING_MODE=... a.c` is totally fine while using `-fstdlib-hardening=` will cause an error. I wonder whether it's the desired behavior. https://github.com/llvm/llvm-project/pull/78763 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits