[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 08:54:32 PDT 2023


v.g.vassilev added inline comments.


================
Comment at: clang/include/clang/Interpreter/Interpreter.h:97
+
+  enum InterfaceKind { NoAlloc, WithAlloc, CopyArray };
+
----------------
junaire wrote:
> v.g.vassilev wrote:
> > junaire wrote:
> > > v.g.vassilev wrote:
> > > > This can probably go in the RuntimeInterfaceBuilder class.
> > > We need it. See:
> > > 
> > > ```
> > > class RuntimeInterfaceBuilder
> > >     : public TypeVisitor<RuntimeInterfaceBuilder, Interpreter::InterfaceKind> {
> > >    ...
> > > }
> > > ```
> > Can't this be an enum which is file local?
> You can't put this enum inside RuntimeInterfaceBuilder because its declaration needs it. If you do so, then the above line will report an error since you use the enum before defined it.
Here is what I had in mind: https://godbolt.org/z/av54aMbG6


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