MaskRay added a comment. See https://github.com/llvm/llvm-project/issues/59307#issuecomment-1407529807 I think we should just report an error for `/clang:-xc`
================ Comment at: clang/lib/Driver/Driver.cpp:2571 // No driver mode exposes -x and /TC or /TP; we don't support mixing them. assert(!Args.hasArg(options::OPT_x) && "-x and /TC or /TP is not allowed"); } ---------------- ``` - assert(!Args.hasArg(options::OPT_x) && "-x and /TC or /TP is not allowed"); + if (auto *A = Args.getLastArg(options::OPT_x)) + Diag(diag::err_drv_unsupported_opt_with_suggestion) + << A->getAsString(Args) << "/TC' or '/TP"; ``` ================ Comment at: clang/test/Driver/x-args.c:8 // CHECK: '-x c++' after last input file has no effect +// +// RUN: %clang_cl /WX /clang:-xc /clang:-E /clang:-dM %s 2>&1 | FileCheck -check-prefix=CL %s ---------------- Delete `//` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142757/new/ https://reviews.llvm.org/D142757 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits