[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)
Qiongsi Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 31 08:18:51 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))
----------------
qiongsiwu wrote:
Good point! Code is revised.
I tried the suggested change
```
if (Args.hasArg(options::OPT_fno_err_pragma_mc_func_aix))
CC1Args.push_back("-fno-err-pragma-mc-func-aix");
```
But it does not handle situations like `-fno-err-pragma-mc-func-aix -ferr-pragma-mc-func-aix` correctly. I think we still need to process both flags in the driver, but we only need to pass `-fno-err-pragma-mc-func-aix` to CC1. Did I miss something?
https://github.com/llvm/llvm-project/pull/101336
More information about the cfe-commits
mailing list