Skip to content

Two fixes to source notes

Matthew Pickering requested to merge wip/source-note-fixes into master
* Better IPE source location estimate
There are some situations where we end up with no source notes in useful
positions in an expression. In this case we currently fail to provide
any source information about where an expression came from.

This patch improves the initial estimate by using the position from the
top-binder as the guess for the location of the whole inner expression.
It provides quite a course estimate but it's better than nothing.

Ticket #20847 


 Matthew Pickering's avatar
Introduce predicate for when to enable source notes (needSourceNotes) 

There were situations where we were using debugLevel == 0 as a proxy for
whether to retain source notes but -finfo-table-map also enables and
needs source notes so we should act consistently in both cases.

Ticket #20847

Merge request reports