This patch refactors the code that checks whether a file has just been included for the first time.
The HeaderSearch::FirstTimeLexingFile function is removed and the information is threaded to the original call site from HeaderSearch::ShouldEnterIncludeFile. This will make it possible to avoid tracking the number of includes in a follow up patch.
Depends on D114092.
As we've discussed earlier, the order of parameters is slightly weird. Usually, out-parameters are at the end of the list, though I'm not sure there is a rule about it. Personally, I would move File to the front because the method is ShouldEnterIncludeFile and keep the order as File, isImport, PP, ModulesEnabled, M, IsFirstIncludeOfFile but that's more my personal opinion and I'll leave the final decision to you.