[PATCH] D141215: [clang-repl] Introduce Value to capture expression results
Vassil Vassilev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 9 05:27:22 PDT 2023
v.g.vassilev added inline comments.
================
Comment at: clang/include/clang/AST/Decl.h:4345
+ }
+ bool isValuePrinting() const { return MissingSemi; }
+ void setValuePrinting(bool Missing = true) { MissingSemi = Missing; }
----------------
We should rename these to `isMissingSemi` or similar.
================
Comment at: clang/include/clang/Interpreter/Interpreter.h:37
+class Value;
class CompilerInstance;
----------------
This seems to be redundant.
================
Comment at: clang/include/clang/Interpreter/Interpreter.h:97
+
+ enum InterfaceKind { NoAlloc, WithAlloc, CopyArray };
+
----------------
This can probably go in the RuntimeInterfaceBuilder class.
================
Comment at: clang/lib/Interpreter/Interpreter.cpp:350
std::list<PartialTranslationUnit> &PTUs = IncrParser->getPTUs();
- if (N > PTUs.size())
+ if (N + InitPTUSize > PTUs.size())
return llvm::make_error<llvm::StringError>("Operation failed. "
----------------
v.g.vassilev wrote:
> I'd propose `IncrParser->getPTUs()` to return the list starting from `InitPTUSize`. That should solve the issue you see.
Ping.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141215/new/
https://reviews.llvm.org/D141215
More information about the cfe-commits
mailing list