[clang-tools-extra] [clang-tidy] Keep parentheses when replacing index access in `sizeof` calls (PR #82166)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 18 12:42:28 PST 2024


Danny =?utf-8?q?Mösch?= <danny.moesch at icloud.com>,
Danny =?utf-8?q?Mösch?= <danny.moesch at icloud.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/82166 at github.com>


================
@@ -1,4 +1,6 @@
-// RUN: %check_clang_tidy %s modernize-loop-convert %t -- -- -I %S/Inputs/loop-convert
+// RUN: %check_clang_tidy %s modernize-loop-convert %t -- -- -I %S/Inputs/loop-convert -isystem %clang_tidy_headers
+
+#include <cstddef>
----------------
PiotrZSL wrote:

you could just use `unsigned int size` in line 94 instead of including this header.

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


More information about the cfe-commits mailing list