-
Notifications
You must be signed in to change notification settings - Fork 11.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
Refactor uses of Cand->Function
in SemaOverload.cpp
#98942
Comments
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below. |
@llvm/issue-subscribers-good-first-issue Author: Shafik Yaghmour (shafik)
We use `Cand->Function` all over `SemaOverload.cpp` e.g.
https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaOverload.cpp#L12583-L12585 In some places it is safe to use without checking b/c in the calling function we checked it prior. It is hard to see that without carefully checking the call chain. It seems like once we check |
@llvm/issue-subscribers-clang-frontend Author: Shafik Yaghmour (shafik)
We use `Cand->Function` all over `SemaOverload.cpp` e.g.
https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaOverload.cpp#L12583-L12585 In some places it is safe to use without checking b/c in the calling function we checked it prior. It is hard to see that without carefully checking the call chain. It seems like once we check |
Since this is basically a superset of #98769 i shall submit a combined PR. |
Summary: - [ ] adds checks to called functions containing `Cand->Function` as an argument. - [ ] Assigned `Cand->Function` as a `FunctionDecl*` to enhance readablity. Solves: #98769 and #98942 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250569
Fixed by #98965 |
We use
Cand->Function
all overSemaOverload.cpp
e.g.https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaOverload.cpp#L12583-L12585
In some places it is safe to use without checking b/c in the calling function we checked it prior. It is hard to see that without carefully checking the call chain.
It seems like once we check
Cand->Function
we should pass it as a separateFunctionDecl*
argument and assert on that argument or at minimum we should assert onCand->Function
in the called function.The text was updated successfully, but these errors were encountered: