[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread Malcolm Parsons via cfe-commits
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

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread David Tarditi via cfe-commits
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

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-17 Thread Malcolm Parsons via cfe-commits
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

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-15 Thread Malcolm Parsons via cfe-commits
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

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-14 Thread David Tarditi via cfe-commits
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

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-12 Thread Malcolm Parsons via cfe-commits
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 ___

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-11 Thread Malcolm Parsons via cfe-commits
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

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-09 Thread David Tarditi via cfe-commits
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

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-09 Thread Alex Lorenz via cfe-commits
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

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-09 Thread Malcolm Parsons via cfe-commits
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();

[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.

2016-11-08 Thread David Tarditi via cfe-commits
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