sammccall marked 2 inline comments as done.
sammccall added inline comments.


================
Comment at: clang/include/clang/Sema/Ownership.h:204
+  PtrTy get() const {
+    void *VP = reinterpret_cast<void *>(Value & ~0x01);
+    return PtrTraits::getFromVoidPointer(VP);
----------------
kadircet wrote:
> nit: `Value == InvalidValue ? nullptr : Value` ?
I think that's probably slower, I don't see how the compiler could avoid 
actually emitting some sort of conditional.

Clang produces cmov: https://godbolt.org/z/croo6o3q6

I'm not 100% sure it matters, but it's a common path we expect to be trivial so 
i'd rather not change it here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158093

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

Reply via email to