Currently the dominant way we get compile commands for open headers is filename based matching (in JSONCompilationDatabase). However we have two sets of better information: - the files that have been open (headers are often opened after some file that includes them) - the background index (most headers have been indexed by some TU) we could make use of these to get the TU, and then transfer its compile command.