Skip to content

Commit b7db5a0

Browse files
FznamznonShivam Gupta
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 9c00054 commit b7db5a0

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
@@ -345,6 +345,9 @@ Bug Fixes in This Version
345345
- Clang now doesn't produce false-positive warning `-Wconstant-logical-operand`
346346
for logical operators in C23.
347347
Fixes (`#64356 <https://github.com/llvm/llvm-project/issues/64356>`_).
348+
- Clang's ``-Wshadow`` no longer warns when an init-capture is named the same as
349+
a class field unless the lambda can capture this.
350+
Fixes (`#71976 <https://github.com/llvm/llvm-project/issues/71976>`_)
348351

349352
Bug Fixes to Compiler Builtins
350353
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)