beanz added inline comments.

================
Comment at: clang/include/clang/Sema/MultiplexExternalSemaSource.h:53
   ///
-  MultiplexExternalSemaSource(ExternalSemaSource& s1, ExternalSemaSource& s2);
+  MultiplexExternalSemaSource(ExternalSemaSource* S1, ExternalSemaSource* S2);
 
----------------
aprantl wrote:
> why this change? Does `&` imply ownership in our coding style?
The old implementation took the address of the references to store. It seems 
more clear to me to accept a pointer when you need a pointer.

The old interface using references also allowed for passing in stack-allocated 
objects, which causes problems since the change here calls retain and release 
on the underlying ref count object. Taking pointers puts the onus on the user 
of the API to think through where the address passed in comes from.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133158

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

Reply via email to