getMergedLocation returns a 'line 0' DILocaiton if the two locations
being merged don't perfecly match, even if they are in the same line but
a different column.
This commit adds support to keep the line number if it matches (but only
the column differs). The merged column number is the leftmost between the
two.
For comparison,
- the GCC output: https://godbolt.org/z/4Mqxfa983
- the Clang output: https://godbolt.org/z/zWaT14Yqr
Notice that gcc seems to use the location of "a" in both cases, while Clang return a line 0 location even if both locations are on the same line.
Should Clang give the correct line number but with column 0? or the left-most? or the line 0 location is in fact more accurate? And should it use the inlined-at scope+line+column in the case it matches?
I have yet to read the source-code of gcc to understand exactly how it works.
Any advice on the subject is welcomed.
Style: Remove the brackets