[all-commits] [llvm/llvm-project] 546cc6: [Clang-Tidy] Fixed `cppcoreguidelines-init-variabl...
Dmitrii Kuragin via All-commits
all-commits at lists.llvm.org
Fri Apr 17 10:00:51 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 546cc690020e4e4317cd05ea833d5e6ff00ec161
https://github.com/llvm/llvm-project/commit/546cc690020e4e4317cd05ea833d5e6ff00ec161
Author: Dmitrii Kuragin <kuraginmail at gmail.com>
Date: 2026-04-17 (Fri, 17 Apr 2026)
Changed paths:
M clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp
M clang-tools-extra/docs/ReleaseNotes.rst
A clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/init-variables-objcxx.mm
Log Message:
-----------
[Clang-Tidy] Fixed `cppcoreguidelines-init-variables` to handle ObjC for-in loops. (#191306)
The check used to report false positive in case of for-in loop in
Objective-C[++]:
```
for (NSString *value in values) {
...
}
```
With the report message:
```
...: warning: variable 'value' is not initialized [cppcoreguidelines-init-variables]
for (NSString *value in values) {
^
= NULL
```
This PR exclude the for-in loop from the the matcher in order to avoid
the false-positive.
Fixes #62106
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list