Skip to content

Commit 5a7580e

Browse files
Fznamznonxgupta
authored andcommitted
[clang] Avoid -Wshadow warning when init-capture named same as class field (llvm#74512)
Shadowing warning doesn't make much sense since field is not available in lambda's body without capturing this. Fixes llvm#71976
1 parent 3817320 commit 5a7580e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,9 @@ Bug Fixes in This Version
939939
- Clang now doesn't produce false-positive warning `-Wconstant-logical-operand`
940940
for logical operators in C23.
941941
Fixes (`#64356 <https://github.com/llvm/llvm-project/issues/64356>`_).
942+
- Clang's ``-Wshadow`` no longer warns when an init-capture is named the same as
943+
a class field unless the lambda can capture this.
944+
Fixes (`#71976 <https://github.com/llvm/llvm-project/issues/71976>`_)
942945

943946
Bug Fixes to Compiler Builtins
944947
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)