[clang-tools-extra] [Clang-Tidy] Fixed `cppcoreguidelines-init-variables` to handle ObjC for-in loops. (PR #191306)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 17 03:08:51 PDT 2026
vbvictor wrote:
Thanks everyone for discussion.
First of, sorry for absences. LLVM has loose time constraints and typical "ping" period is one week.
> I’m a bit confused about what we’re discussing: is the question whether we want to
I originally had a thought that we should just disable CPP-CORE checks from being run on non-C++ code since CPP-CORE are specifically targeting C++ code, but this statement:
> Just for the context: In our project (due to legacy reasons) much of the code is compiled as Objective-C++ because it includes Cocoa headers. Even if most of the code is strictly speaking C++ and some of the headers are shared with C++ and Objective-C[++] we would extremely value the check to be enabled for .mm and -x objective-c++ cases.
Gives picture that people are still using those check on C++ code inside obj-C.
So I think we should not immediately turn-off those checks for obj-c but in the long term it may bring several pitfalls: more churn to maintainers to triage (and probably fix) bugs involving obj-C with checks that weren't designed to run on obj-C.
https://github.com/llvm/llvm-project/pull/191306
More information about the cfe-commits
mailing list