[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 2 13:04:03 PDT 2018


Rakete1111 added inline comments.


================
Comment at: lib/Sema/SemaDeclCXX.cpp:6187
+        Record->dropAttr<TriviallyRelocatableAttr>();
+      } else if (Record->needsImplicitMoveConstructor() &&
+                 Record->defaultedMoveConstructorIsDeleted()) {
----------------
Quuxplusone wrote:
> Rakete1111 wrote:
> > This is dead code. `Record` never needs an implicit move constructor at this point, because either 1) it never did or 2) it was defined above by `LookupSpecialMember`.
> Confirmed that this code is never hit; and removed. Just for my own information: you're saying that the call to `LookupSpecialMember` on line 6179, even though it's looking up the //destructor//, will actually cause all the `needsImplicitFootor` flags to get resolved? And so also I guess I should never have been looking at those flags directly; I should have handled this case by calling `LookupSpecialMember` like I do on line 6196. Is that basically correct?
No, not the 6179 one, but the one before it 6163. Yeah you could have :)


Repository:
  rC Clang

https://reviews.llvm.org/D50119





More information about the cfe-commits mailing list