[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

Chen Zheng via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 31 08:00:29 PDT 2024


================
@@ -562,7 +562,7 @@ void AIX::addClangTargetOptions(
     CC1Args.push_back("-fno-sized-deallocation");
 
   if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix,
-                   options::OPT_fno_err_pragma_mc_func_aix, false))
+                   options::OPT_fno_err_pragma_mc_func_aix, true))
----------------
chenzheng1030 wrote:

Since the preprocessor has a default value, can we avoid the cc1 option if the value here matches the default value inside the preprocessor, like:
```
if (Args.hasArg(options::OPT_fno_err_pragma_mc_func_aix))
   CC1Args.push_back("-fno-err-pragma-mc-func-aix");
```

(no need to pass `-ferr-pragma-mc-func-aix` as it is the default inside preprocessor.)

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


More information about the cfe-commits mailing list