Skip to content

Refactor uses of Cand->Function in SemaOverload.cpp #98942

@shafik

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"code-cleanupgood first issuehttps://github.com/llvm/llvm-project/contribute

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions