[clang] [clang][clang-cl] Add -fms-preprocessor-compat and support /Zc:preprocessor (PR #167200)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 3 06:23:03 PST 2026


================
@@ -3238,6 +3238,10 @@ def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>,
   Visibility<[ClangOption, CC1Option, CLOption]>,
   HelpText<"Enable full Microsoft Visual C++ compatibility">,
   MarshallingInfoFlag<LangOpts<"MSVCCompat">>;
+def fms_preprocessor_compat : Flag<["-"], "fms-preprocessor-compat">, Group<f_Group>,
+  Visibility<[ClangOption, CC1Option]>,
+  HelpText<"Enable full emulation of the traditional MSVC preprocessor">,
+  MarshallingInfoFlag<LangOpts<"MSVCPreprocessor">>;
----------------
cor3ntin wrote:

Can we use  `ImpliedByAnyOf<[fms_extensions.KeyPath]>;` here

https://github.com/llvm/llvm-project/pull/167200


More information about the cfe-commits mailing list