Quuxplusone added inline comments.

================
Comment at: lib/Sema/SemaDeclCXX.cpp:6187
+        Record->dropAttr<TriviallyRelocatableAttr>();
+      } else if (Record->needsImplicitMoveConstructor() &&
+                 Record->defaultedMoveConstructorIsDeleted()) {
----------------
Rakete1111 wrote:
> Rakete1111 wrote:
> > 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 :)
> Sorry for the noise, that isn't it because of the if statement right before 
> 6163 :/. I was wrong...
> 
> Every implicit constructor is already defined before the call to 
> `CheckCompletedCXXClass` (except if it's a template), so 
> `needsImplicitFootor` is always `false`. This means that you can drop the if 
> statement right before 6163, because it's always true.
> 
> I'm 99% sure of the previous paragraph. :)
I notice that `test/SemaCXX/implicit-member-functions.cpp` has started failing 
in my branch, although there's a *possibility* that that's due to a change in 
master. I'm going to investigate a little bit.


Repository:
  rC Clang

https://reviews.llvm.org/D50119



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

Reply via email to