diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-25 00:34:00 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-08-25 00:34:00 +0000 |
commit | 7195f857860a8482f2841ee45c0d36d606bdd20e (patch) | |
tree | 7160e7e101f4fdea95a3adc09b9f03d178061aca /test/PCH | |
parent | b5b9d9e3073e64593e59f48a9dfd6aef676fe7f0 (diff) |
Lazily load the ContextDecl for a lambda's DefinitionData, to fix a
deserialization cycle caused by the ContextDecl recursively importing members
of the lambda's closure type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@279694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r-- | test/PCH/cxx11-lambdas.mm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/PCH/cxx11-lambdas.mm b/test/PCH/cxx11-lambdas.mm index 5d3323a02c..1f568f05e1 100644 --- a/test/PCH/cxx11-lambdas.mm +++ b/test/PCH/cxx11-lambdas.mm @@ -38,6 +38,11 @@ int init_capture(T t) { return [&, x(t)] { return sizeof(x); }; } +struct X { + template <typename T> X(T); +}; +struct Y { Y(const X &x = [] {}); }; + #else // CHECK-PRINT: T add_slowly @@ -54,4 +59,6 @@ int add(int x, int y) { // CHECK-PRINT: init_capture // CHECK-PRINT: [&, x(t)] +X x = [] {}; + #endif |