Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang should not warn "capture 'this' is not used" if it is used in another branch of if-constexpr. #50807

Closed
zoecarver opened this issue Aug 12, 2021 · 1 comment
Labels
bugzilla Issues migrated from bugzilla c++20 clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer duplicate Resolved as duplicate false-positive Warning fires when it should not

Comments

@zoecarver
Copy link
Contributor

Bugzilla Link 51465
Version trunk
OS All
CC @dwblaikie,@zygoloid

Extended Description

The following will fail to compile, even though the member "p" is used in another branch of the if-constexpr: https://godbolt.org/z/hWbjbWYjq

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@Quuxplusone Quuxplusone added the clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer label Jan 17, 2022
@wheatman wheatman added the duplicate Resolved as duplicate label Nov 4, 2023
@wheatman
Copy link
Contributor

wheatman commented Nov 4, 2023

duplicate of #34798

@wheatman wheatman closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
@EugeneZelenko EugeneZelenko added the false-positive Warning fires when it should not label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++20 clang:diagnostics New/improved warning or error message in Clang, but not in clang-tidy or static analyzer duplicate Resolved as duplicate false-positive Warning fires when it should not
Projects
Status: Done
Development

No branches or pull requests

4 participants