Skip to content

Add NullablePtr type#8709

Draft
stevenfontanella wants to merge 1 commit into
expression-effectsfrom
nullable-ptr
Draft

Add NullablePtr type#8709
stevenfontanella wants to merge 1 commit into
expression-effectsfrom
nullable-ptr

Conversation

@stevenfontanella
Copy link
Copy Markdown
Member

No description provided.

Comment thread src/ir/effects.h
const EffectAnalyzer* bodyEffects) {
void
addCallEffects(const CallType* curr,
NullablePtr<const EffectAnalyzer*> bodyEffects) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious to hear more opinions here, but I generally feel that we can use default values of =nullptr in such cases where null is possible. I mean

Suggested change
NullablePtr<const EffectAnalyzer*> bodyEffects) {
const EffectAnalyzer* bodyEffects=nullptr) {

This generally what we've done so far.

And, on the other hand, we do have many places with a pointer that is non-nullable, but I wonder if the best thing is not to convert those to references. Though it would be a large change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants