awarzynski added a comment. Thanks for the update! One thing that's not clear to me - how come "-Wextra" **is not** treated as an error and "-Wblah" **is**? That's not clear from the code.
I'm also realising that I incorrectly assumed that `-Wextra` was defined in Options.td. Instead, it's defined in DiagnosticGroup.td <https://github.com/llvm/llvm-project/blob/7301a7ce196e217c077b2b68f58366be48664223/clang/include/clang/Basic/DiagnosticGroups.td#L1067>. I've not worked with that file and it's not clear to me how it works. IIUC, that file encapsulates all the user-facing logic controlling diagnostics in Clang. I am mentioning this as in your approach you are effectively re-defining "-Wextra" in Options.td. That's unfortunate (it's duplication), but IMO the approach taken here is fine - all tests pass and tweaking Clang's DiagnosticGroup.td is beyond the scope. I just want understand what "makes this work" :) ================ Comment at: clang/include/clang/Driver/Options.td:4881 +multiclass FlangIgnoredWarning<string name> { + def unsupported_warning_w#NAME : Flag<["-", "--"], "W"#name>, Group<flang_ignored_w_Group>; ---------------- [nit] These are diag options. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143301/new/ https://reviews.llvm.org/D143301 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits