[PATCH] D119708: [clang][lex] Remove `PPCallbacks::FileNotFound()`

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 20 02:23:08 PST 2023


Hahnfeld added a comment.

In D119708#4062632 <https://reviews.llvm.org/D119708#4062632>, @jansvoboda11 wrote:

> If the plan is to eventually upstream that part of Cling, I'm fine with re-adding a safe version of this API.

I'll be honest here and say that I personally find it unlikely that this part of ROOT will be upstreamed, it is very specific and also there for backwards-compatibility in a very specific case. Nevertheless, I understand that Clang should offer its clients a rich API to get all information they need, so I put together https://reviews.llvm.org/D142196 with a hopefully "safe" version of a `FileNotFound` callback, that optionally even supports silently skipping this file. This would provide exactly what we need.

Another possibility that I considered is extending `InclusionDirective` and always call it, also for missing files. However, I find this much less clear and we already have `FileSkipped`...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119708/new/

https://reviews.llvm.org/D119708



More information about the cfe-commits mailing list