[cfe-commits] [Patch][Review] Bug 13329 - Incorrect code generated for automatic assignment operator
Jonathan Sauer
jonathan.sauer at gmx.de
Tue Jul 17 11:40:51 PDT 2012
Hello,
I have attached a shiny new patch :-)
> As noted in the PR:
>
> This is definitely the right approach. A few specific comments:
>
> - This change should affect the the EmitGCMemmoveCollectable call as well,
> since the same bug exists there for Objective-C++ GC
Done.
> - There are other CreateMemCpy calls in IR generation that likely need this
> same computation.
I looked at them, but as far as I could tell none of them are tasked with copying
structs during assignment.
> Please factor this computation into a separate routine and
> update those callers
Done. As of now I did not include memoization of the result. If compile-time
performance regresses, I can add it.
> - Please include a test case that generates IR and checks that it does the
> right thing
Done. I hope the test file I expanded is the correct one.
The only strange thing (I left a FIXME in the test case) is that a struct derived
from a POD is not considered to be a POD (__is_pod also returns false in that case).
I'm unsure whether this is correct (my reading of the standard says no).
Also, was there a particular reason why the three isPOD-methods in Type originally
got passed a non-const ASTContext instead of a const one?
Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR13329.patch
Type: application/octet-stream
Size: 8256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120717/fe103559/attachment.obj>
-------------- next part --------------
More information about the cfe-commits
mailing list