From f1f6d85694fcf772f6d602fd9709318b08b96328 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 26 Oct 2011 06:49:26 +0000 Subject: Fix crash due to missing array-to-pointer decay when instantiating an unresolved member expression. Refactoring to follow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143017 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaTemplate/instantiate-expr-4.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/SemaTemplate') diff --git a/test/SemaTemplate/instantiate-expr-4.cpp b/test/SemaTemplate/instantiate-expr-4.cpp index 9483f9b283..d95ccfecd9 100644 --- a/test/SemaTemplate/instantiate-expr-4.cpp +++ b/test/SemaTemplate/instantiate-expr-4.cpp @@ -282,6 +282,16 @@ template struct ArrowMemRef0, int (*)(int)>; template struct ArrowMemRef0, float&>; // expected-note{{instantiation}} template struct ArrowMemRef0 >, int&>; +struct UnresolvedMemRefArray { + int f(int); + int f(char); +}; +UnresolvedMemRefArray Arr[10]; +template int UnresolvedMemRefArrayT(U u) { + return Arr->f(u); +} +template int UnresolvedMemRefArrayT(int); + // FIXME: we should be able to return a MemInt without the reference! MemInt &createMemInt(int); -- cgit v1.2.1