-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
False positive lifetime GSL warning for no-capture lambda? #126600
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
false-positive
Warning fires when it should not
Comments
smeenai
added a commit
to smeenai/llvm-project
that referenced
this issue
Feb 10, 2025
This warning is causing lots of build spam when I use a recent Clang as my host compiler. It's a potential false positive, so silence it until llvm#126600 is resolved.
smeenai
added a commit
that referenced
this issue
Feb 11, 2025
This warning is causing lots of build spam when I use a recent Clang as my host compiler. It's a potential false positive, so silence it until #126600 is resolved. Fix variable casing while I'm here.
github-actions bot
pushed a commit
to arm/arm-toolchain
that referenced
this issue
Feb 11, 2025
…rt.h (#126140) This warning is causing lots of build spam when I use a recent Clang as my host compiler. It's a potential false positive, so silence it until llvm/llvm-project#126600 is resolved. Fix variable casing while I'm here.
Icohedron
pushed a commit
to Icohedron/llvm-project
that referenced
this issue
Feb 11, 2025
…126140) This warning is causing lots of build spam when I use a recent Clang as my host compiler. It's a potential false positive, so silence it until llvm#126600 is resolved. Fix variable casing while I'm here.
alejandro-alvarez-sonarsource
pushed a commit
to alejandro-alvarez-sonarsource/llvm-project
that referenced
this issue
Feb 12, 2025
…126140) This warning is causing lots of build spam when I use a recent Clang as my host compiler. It's a potential false positive, so silence it until llvm#126600 is resolved. Fix variable casing while I'm here.
flovent
pushed a commit
to flovent/llvm-project
that referenced
this issue
Feb 13, 2025
…126140) This warning is causing lots of build spam when I use a recent Clang as my host compiler. It's a potential false positive, so silence it until llvm#126600 is resolved. Fix variable casing while I'm here.
joaosaffran
pushed a commit
to joaosaffran/llvm-project
that referenced
this issue
Feb 14, 2025
…126140) This warning is causing lots of build spam when I use a recent Clang as my host compiler. It's a potential false positive, so silence it until llvm#126600 is resolved. Fix variable casing while I'm here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
false-positive
Warning fires when it should not
For the code in https://godbolt.org/z/v919qqe6o:
Clang trunk produces a warning:
Clang seems to consider the no-capture lambda as a temporary that will be destroyed at the end of the expression. I'm not a standards expert and I haven't found anything definitive through searching, but in practice no-capture lambdas will turn into ordinary functions, so there's no actual issue here. Should we actually be warning for this?
a3b4d91 is a commit that ran into this and changed the code slightly to avoid it (the code change made there would result in a stack-use-after-free were this an actual issue, but it avoids the warning). #126140 is a high-firing instance of this warning, and we'd appreciate some guidance.
The text was updated successfully, but these errors were encountered: