[clang-tools-extra] [clang-tidy] New option `CompilationArgsToRemoveRegex` to remove arguments from the command line (PR #111453)
Julian Schmidt via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 24 14:57:05 PST 2024
=?utf-8?q?FĂ©lix-Antoine?= Constantin
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/111453 at github.com>
5chmidti wrote:
I think the regex solution might be brittle/not clean from a user perspective, with potential for a small amount of maintenance. Instead, I would also suggest a flag to error, warn, or silence these, defaulting to a warning.
Using `compile_commands.json` from a build configured for another compiler should provide a good experience.
- problem: `--flag` is not known to Clang, but would enable some part through a macro define -> missed analysis of important part of the code base?
- fine: `--other` is not known to Clang, but also not important to analysis because it does something during code-gen, etc.
The `--flag` example is why I'd be a bit worried about fully silencing these unknown flags, instead of a downgrade to a warning.
https://github.com/llvm/llvm-project/pull/111453
More information about the cfe-commits
mailing list