[clang] c9889c4 - [clang-cl] Don't expand /permissive- to /ZC:strictStrings yet

Markus Böck via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 19 04:28:42 PDT 2021


Author: Markus Böck
Date: 2021-06-19T13:28:32+02:00
New Revision: c9889c44ec5a4054833457c813e155f284703ef4

URL: https://github.com/llvm/llvm-project/commit/c9889c44ec5a4054833457c813e155f284703ef4
DIFF: https://github.com/llvm/llvm-project/commit/c9889c44ec5a4054833457c813e155f284703ef4.diff

LOG: [clang-cl] Don't expand /permissive- to /ZC:strictStrings yet

Follow up on rGc70b0e808da8

/Zc:strictStrings is an alias to an option part of the -W group. When the driver tries to render the option back to a string for the cc1 invocation, it sadly gets rendered with the original spelling instead of the alias, causing issues reported here: https://reviews.llvm.org/D103773#inline-989447

I am thinking it's the best to revert this part of the patch until I figured out how to correctly add the arg and until /Zc:strictStrings- exists/is needed.

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/MSVC.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/MSVC.cpp b/clang/lib/Driver/ToolChains/MSVC.cpp
index bb17f73e1488..cf08c42965c8 100644
--- a/clang/lib/Driver/ToolChains/MSVC.cpp
+++ b/clang/lib/Driver/ToolChains/MSVC.cpp
@@ -1493,14 +1493,12 @@ static void TranslatePermissive(Arg *A, llvm::opt::DerivedArgList &DAL,
                                 const OptTable &Opts) {
   DAL.AddFlagArg(A, Opts.getOption(options::OPT__SLASH_Zc_twoPhase_));
   DAL.AddFlagArg(A, Opts.getOption(options::OPT_fno_operator_names));
-  // There is currently no /Zc:strictStrings- in clang-cl
 }
 
 static void TranslatePermissiveMinus(Arg *A, llvm::opt::DerivedArgList &DAL,
                                      const OptTable &Opts) {
   DAL.AddFlagArg(A, Opts.getOption(options::OPT__SLASH_Zc_twoPhase));
   DAL.AddFlagArg(A, Opts.getOption(options::OPT_foperator_names));
-  DAL.AddFlagArg(A, Opts.getOption(options::OPT__SLASH_Zc_strictStrings));
 }
 
 llvm::opt::DerivedArgList *


        


More information about the cfe-commits mailing list