-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Fix -Wdangling-assignment-gsl warnings #84959
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
Fix -Wdangling-assignment-gsl warnings #84959
Conversation
|
@swift-ci please smoke test |
|
ping |
885002b to
457984a
Compare
|
@swift-ci please smoke test |
lib/Sema/TypeCheckType.h
Outdated
| return unboundTyOpener; | ||
| } | ||
|
|
||
| static Type defaultUnbountTypeOpener(UnboundGenericType *ty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| static Type defaultUnbountTypeOpener(UnboundGenericType *ty) { | |
| static Type defaultUnboundTypeOpener(UnboundGenericType *ty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good typo catch.
Fix new clang warnings that can indicate potential use-after-free from dangling pointers. The issues are mostly coming from `llvm::function_ref` are not owning the function, and `std::function` should be used in those cases.
457984a to
a7d7def
Compare
|
@swift-ci please smoke test |
atrick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
@swift-ci please smoke test windows platform |
Fix new clang warnings that can indicate potential use-after-free from
dangling pointers.
The issues are mostly coming from
llvm::function_refare not owningthe function, and
std::functionshould be used in those cases.