[clang-tools-extra] [clang-tidy] New option `CompilationArgsToRemoveRegex` to remove arguments from the command line (PR #111453)
Nicolas van Kempen via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 20 17:09:13 PST 2024
=?utf-8?q?FĂ©lix-Antoine?= Constantin
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/111453 at github.com>
nicovank wrote:
Just for discussion:
1. Almost equivalent to `sed -i -E 's/-f[[:alnum:][:punct:]]*//g; s/-Werror//g' compile_commands.json`?
2. What if a `-f...` argument is needed while others should be ignored? The regex might get complicated in some cases.
3. I don't know how difficult this is at all: maybe an `--ignore-unknown-flags` option that emits a warning when unknown flags are encountered instead of failing and ignores only those could be another solution?
https://github.com/llvm/llvm-project/pull/111453
More information about the cfe-commits
mailing list