[clang] [clang-repl] Create virtual files for `input_line_N` buffers (PR #182044)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 19 04:20:18 PST 2026


devajithvs wrote:

> why doesn't clang-repl register these as virtual files in `FileManager` so that they don't require special-casing here?

Thanks @jansvoboda11. This is exactly what we do in cling.

But after https://github.com/llvm/llvm-project/commit/84df7a09f8da5809b85fd097015e5ac6cc8a3f88, we need to ensure `HeaderFileInfo` exists before lookup to prevent assertion.

As a part of reducing our internal clang patches in `cling`, I thought I will adapt to what `clang-repl` does (without registering these as virtual files)

I have updated the PR and the description (we still need minor changes in `VerifyDiagnosticConsumer.cpp` ).

https://github.com/llvm/llvm-project/pull/182044


More information about the cfe-commits mailing list