Files
Ziqing LuoandBalázs Benics a18c09a05d [clang][index][USR] GenLoc prints file entry at most once, allow repeated offsets (#205430)
`GenLoc` previously printed the source location at most once per USR,
gated by a member flag toggled on the first call. During the recursive
visit, if both an outer and an inner decl needed to print the location,
only the outer one was printed. When the outer decl did not need the
offset, no offset was ever printed. For example, the USR of
`Holder<decltype([]{})>::method` depends on the location of the type of
the lambda but the outer decl prints the file entry only, which disables
offset printing.

Change the logic so the file-entry part of the location is printed at
most once (it must be identical), while offsets of sub-decl locations
may be printed multiple times.

rdar://180654884

---------

Co-authored-by: Balázs Benics <benicsbalazs@gmail.com>
2026-06-25 13:54:01 -07:00
..