aaron.ballman added inline comments.

================
Comment at: clang/lib/AST/Interp/Descriptor.cpp:328-330
+InitMap::T *InitMap::data() { return Data.get(); }
 
+const InitMap::T *InitMap::data() const { return Data.get(); }
----------------
Inline these into the header now?

Even though these are private methods, I'm a bit worried about handing out a 
naked pointer that comes from a `unique_ptr` as that's pretty easy to run into 
lifetime issues with, but I think it's okay as-is (I don't have a vastly better 
approach.)


================
Comment at: clang/lib/AST/Interp/Descriptor.h:207
   /// Initializes the map with no fields set.
   InitMap(unsigned N);
 
----------------
Now that this is public, can we make it `explicit` so we don't get accidental 
conversions from `unsigned`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154581/new/

https://reviews.llvm.org/D154581

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to