[PATCH] D91089: [dllexport] Instantiate default ctor default args for explicit specializations (PR45811)

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 9 10:28:32 PST 2020


hans created this revision.
hans added reviewers: rnk, zahiraam.
Herald added a project: clang.
hans requested review of this revision.

For dllexported default constructors with default arguments, we export default constructor closures which pass in the default args. (See D8331 <https://reviews.llvm.org/D8331> for a good explanation.)

For templates, that means those default args must be instantiated even if the function isn't called. That is done by the InstantiateDefaultCtorDefaultArgs() function, but it wasn't done for explicit specializations, causing asserts (see bug).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91089

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  clang/test/CodeGenCXX/dllexport-ctor-closure.cpp
  clang/test/SemaCXX/dllexport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91089.303924.patch
Type: text/x-patch
Size: 5917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201109/eb1286c5/attachment.bin>


More information about the cfe-commits mailing list