This is an archive of the discontinued LLVM Phabricator instance.

[Diag] Avoid emitting a redefinition note if no location is available.
ClosedPublic

Authored by mattd on Mar 26 2018, 11:05 AM.

Details

Summary

The "previous definition is here" note is not helpful if there is no location information. The note will reference nothing in such a case. This patch first checks to see if there is location data, and if so the note diagnostic is emitted.

This fixes PR15409. The issue in the first comment seems to already be resolved. This patch addresses the second example.

Diff Detail

Repository
rC Clang

Event Timeline

mattd created this revision.Mar 26 2018, 11:05 AM
bruno accepted this revision.Mar 27 2018, 3:47 PM

LGTM

This revision is now accepted and ready to land.Mar 27 2018, 3:47 PM
This revision was automatically updated to reflect the committed changes.