[clang-tools-extra] [clang-tidy] New option to remove arguments from the command line (PR #164344)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 26 12:14:08 PDT 2025


=?utf-8?q?Félix-Antoine?= Constantin,
=?utf-8?q?Félix-Antoine?= Constantin,
=?utf-8?q?Félix-Antoine?= Constantin,
=?utf-8?q?Félix-Antoine?= Constantin
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/164344 at github.com>


================
@@ -0,0 +1,7 @@
+// RUN: not clang-tidy %s -- -fnot-an-option | FileCheck %s -check-prefix=INVALID-A
+// RUN: clang-tidy %s --config="{RemovedArgs: ['-fnot-an-option']}" -- -fnot-an-option
+// RUN: clang-tidy %s --config="{RemovedArgs: ['-fnot-another-option', '-fnot-an-option']}" -- -fnot-an-option -fnot-another-option
+// RUN clang-tidy %s --removed-arg="-fnot-an-option" -- -fnot-an-option -fnot-another-option | FileCheck %s -check-prefix=INVALID-B
----------------
vbvictor wrote:

```suggestion
// RUN: clang-tidy %s --removed-arg="-fnot-an-option" -- -fnot-an-option -fnot-another-option | FileCheck %s -check-prefix=INVALID-B
```

Did the test run before? IIRC for lit to work it needs `:` token..?

https://github.com/llvm/llvm-project/pull/164344


More information about the cfe-commits mailing list