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

David Tarditi via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 09:35:54 PST 2016


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.  This is why the tests passed on Windows and failed on Linux.  I updated Sema/DeclSpec.cpp to zero the parameter array before it is used.

Here are the test results from an x64 Linux Ubuntu box:

Testing Time: 465.12s

  Expected Passes    : 10017
  Expected Failures  : 18
  Unsupported Tests  : 27


https://reviews.llvm.org/D26435

Files:
  include/clang/Parse/Parser.h
  include/clang/Sema/DeclSpec.h
  lib/Parse/ParseCXXInlineMethods.cpp
  lib/Parse/ParseDecl.cpp
  lib/Parse/ParseDeclCXX.cpp
  lib/Sema/DeclSpec.cpp
  lib/Sema/SemaDeclCXX.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26435.78375.patch
Type: text/x-patch
Size: 7852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161117/17aebeb4/attachment-0001.bin>


More information about the cfe-commits mailing list