diff options
Diffstat (limited to 'test/Analysis/ctor.mm')
-rw-r--r-- | test/Analysis/ctor.mm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Analysis/ctor.mm b/test/Analysis/ctor.mm index 646229aac989d..619e2cb0f0442 100644 --- a/test/Analysis/ctor.mm +++ b/test/Analysis/ctor.mm @@ -704,3 +704,20 @@ namespace PR19579 { }; } } + +namespace NoCrashOnEmptyBaseOptimization { + struct NonEmptyBase { + int X; + explicit NonEmptyBase(int X) : X(X) {} + }; + + struct EmptyBase {}; + + struct S : NonEmptyBase, EmptyBase { + S() : NonEmptyBase(0), EmptyBase() {} + }; + + void testSCtorNoCrash() { + S s; + } +} |