[Diag] Avoid emitting a redefinition note if no location is available.
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.
Reviewers: bruno, rsmith
Reviewed By: bruno
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D44901
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328712
91177308-0d34-0410-b5e6-
96231b3b80d8