[clang] [APINotes] Upstream Driver and Frontend options that enable API Notes (PR #73120)
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 07:43:20 PST 2023
================
@@ -6720,6 +6720,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
Args.addOptOutFlag(CmdArgs, options::OPT_fassume_sane_operator_new,
options::OPT_fno_assume_sane_operator_new);
+ if (Args.hasFlag(options::OPT_fapinotes, options::OPT_fno_apinotes, false) ||
+ Args.hasArg(options::OPT_iapinotes_modules)) {
----------------
compnerd wrote:
If I am reading this correctly, this is not particularly helpful since it just repeats the conditions.
```
if (Args.hasFlag(options::OPT_fapinotes, options::OPT_fno_apinotes, false))
CmdArgs.push_back("-fapinotes");
if (Args.hasArg(options::OPT_iapinotes_modules)) {
if (Args.hasFlag(options::OPT_fapinotes_modules, options::OPT_fno_apinotes_modules, false))
CmdArgs.push_back("-fapinotes-modules");
Args.AddLastArg(CmdArgs, options::OPT_fapinotes_swift_version);
}
```
Or are the inner checks supposed to be for `OPT_fapinotes`?
https://github.com/llvm/llvm-project/pull/73120
More information about the cfe-commits
mailing list