In all of these cases, the functions could simply return a nullptr instead of {}.
There is no case where Optional<nullptr> has a special meaning.
Details
Details
- Reviewers
int3 gkm thakis - Group Reviewers
Restricted Project - Commits
- rG8f89c054afa1: [lld-macho][nfc] Remove unnecessary use of Optional<T*>
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I guess the idea was that the Optional forces you to "null" check, while the pointer doesn't? Fine to land if you want, but fine to not land too imho.
Comment Actions
I like the safety that Optional<T*> gives, but I'm also aware that we aren't consistent about using it in our codebase (and I like consistency), so I'm fine with this