aaron.ballman added inline comments.
================ Comment at: clang/lib/AST/Interp/Context.h:88 + /// Returns the program. This is only needed for unittests. + Program &getProgram() const { return *P.get(); } + ---------------- tbaeder wrote: > cor3ntin wrote: > > This should return a const ref > Things like `getGlobal()` aren't const so that doesn't work. If this is only needed for testing, can we make it a private function and use friendship to expose it to just what needs it? (Esp because it's got some odd const-correctness properties to it.) ================ Comment at: clang/lib/AST/Interp/Pointer.h:81-88 + /// Equality operators are just for tests. + bool operator==(const Pointer &P) const { + return Pointee == P.Pointee && Base == P.Base && Offset == P.Offset; + } + + bool operator!=(const Pointer &P) const { + return Pointee != P.Pointee || Base != P.Base || Offset != P.Offset; ---------------- Same here -- can these be private and friended? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158069/new/ https://reviews.llvm.org/D158069 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits