[PATCH] D126266: Mark the file entry invalid, until reread. Invalidate SLocEntry cache, readd it on reread. Do not use translateFile, because it pulls in parts of the pch.
Volodymyr Sapsai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 4 21:03:42 PDT 2022
vsapsai added a comment.
Hmm, I'm concerned with the pieces added purely for testing. Specifically, `FileEntriesToReread` and TestHelper friend functions. Need to think how else we can test it.
Do you intend to support only the error cases like
clang-repl> #include "file_with_error.h"
// error is printed, we edit the file and include it again:
clang-repl> #include "file_with_error.h"
or do you want to handle re-including files? Something like
clang-repl> #include "experiments.h"
// edit the file and include it again:
clang-repl> #include "experiments.h"
Asking because maybe in the error case we commit to some state too eagerly and fixing that sticky eagerness is another option (just guessing, have no idea if it is an actual option and if it is "better").
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126266/new/
https://reviews.llvm.org/D126266
More information about the llvm-commits
mailing list