Issue 98942
Summary Refactor uses of `Cand->Function` in `SemaOverload.cpp`
Labels good first issue, code-cleanup
Assignees
Reporter 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 `Cand->Function` we should pass it as a separate `FunctionDecl*` argument and assert on that argument or at minimum we should assert on `Cand->Function` in the called function.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to