[clang-tools-extra] [clang-tidy] Make `P +- BS / sizeof(*P)` opt-outable in `bugprone-sizeof-expression` (PR #111178)
Nicolas van Kempen via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 5 14:41:13 PDT 2024
================
@@ -0,0 +1,12 @@
+// RUN: %check_clang_tidy %s bugprone-sizeof-expression %t -- \
+// RUN: -config="{CheckOptions: [{key: bugprone-sizeof-expression.WarnOnSizeOfPointerArithmeticWithDivisionScaled, value: 0}]}"
----------------
nicovank wrote:
```suggestion
// RUN: %check_clang_tidy %s bugprone-sizeof-expression %t -- \
// RUN: -config="{CheckOptions: \
// RUN: {bugprone-sizeof-expression.WarnOnSizeOfPointerArithmeticWithDivisionScaled: \
// RUN: false}}"
```
I didn't even know this `[{key: ..., value: ...}, ...]` notation existed, TIL.
https://github.com/llvm/llvm-project/pull/111178
More information about the cfe-commits
mailing list