From f3beabfcbb35961b44afc093eb435df7f2a6b785 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sat, 22 Jan 2011 15:34:07 +0000 Subject: [PATCH] Add test from PR9026. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124034 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaCXX/crashes.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/test/SemaCXX/crashes.cpp b/test/SemaCXX/crashes.cpp index 9b0f19e746..c75b0401fe 100644 --- a/test/SemaCXX/crashes.cpp +++ b/test/SemaCXX/crashes.cpp @@ -75,5 +75,23 @@ namespace PR9007 { yyy = sizeof(struct foo*) }; foo *xxx(); -}; + }; +} + +namespace PR9026 { + class InfallibleTArray { + }; + class Variant; + class CompVariant { + operator const InfallibleTArray&() const; + }; + class Variant { + operator const CompVariant&() const; + }; + void Write(const Variant& __v); + void Write(const InfallibleTArray& __v); + Variant x; + void Write2() { + Write(x); + } } -- 2.40.0