This revision was automatically updated to reflect the committed changes.
Closed by commit rL287241: Use unique_ptr for cached tokens for default
arguments in C++. (authored by malcolm.parsons).
Changed prior to commit:
https://reviews.llvm.org/D26435?vs=78375&id=78380#toc
Repository:
rL LLV
dtarditi updated this revision to Diff 78375.
dtarditi added a comment.
The parameter array needed to be initialized so that assignments involving
unique pointers work properly. The memory could be uninitialized according to
C++ semantics.. Visual C++ was zeroing the memory and GCC was not. T
malcolm.parsons accepted this revision.
malcolm.parsons added a comment.
This revision is now accepted and ready to land.
LGTM.
https://reviews.llvm.org/D26435
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
malcolm.parsons added a comment.
In https://reviews.llvm.org/D26435#595282, @dtarditi wrote:
> What platform/OS did you build on?
I build release with asserts on 64 bit Linux. My host compiler is gcc.
https://reviews.llvm.org/D26435
___
cfe-commi
dtarditi added a comment.
I sync'ed to the head of the tree. I tried to reproduce the failures that you
saw and couldn't.I'm building on Windows 10 x64 using Visual Studio. What
platform/OS did you build on? I built and test both Debug and RelWithDebugInfo.
Here's what I saw for RelWithD
malcolm.parsons requested changes to this revision.
malcolm.parsons added a comment.
This revision now requires changes to proceed.
Expected Passes: 4977
Expected Failures : 18
Unsupported Tests : 25
Unexpected Failures: 5037
Needs more work?
https://reviews.llvm.org/D26435
___
malcolm.parsons accepted this revision.
malcolm.parsons added a reviewer: malcolm.parsons.
malcolm.parsons added a comment.
This revision is now accepted and ready to land.
Your email went in my spam folder.
LGTM.
Will commit later.
https://reviews.llvm.org/D26435
dtarditi updated this revision to Diff 77373.
dtarditi added a comment.
Thanks for the code review feedback - I've addressed it. Yes, we should use
reset() instead of release(). I also deleted the unnecessary brackets. I
don't have commit access, so if this looks good, could someone commit t
arphaman added inline comments.
Comment at: include/clang/Sema/DeclSpec.h:1313
void freeParams() {
for (unsigned I = 0; I < NumParams; ++I) {
+Params[I].DefaultArgTokens.release();
You can elide the curly braces here now that the loop has just
malcolm.parsons added inline comments.
Comment at: include/clang/Sema/DeclSpec.h:1314
for (unsigned I = 0; I < NumParams; ++I) {
-delete Params[I].DefaultArgTokens;
-Params[I].DefaultArgTokens = nullptr;
+Params[I].DefaultArgTokens.release();
dtarditi created this revision.
dtarditi added a subscriber: cfe-commits.
This changes pointers to cached tokens for default arguments in C++ from raw
pointers to unique_ptrs. There was a fixme in the code where the cached tokens
are created about using a smart pointer.
The change is straight
11 matches
Mail list logo