diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-26 06:49:26 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-26 06:49:26 +0000 |
commit | f1f6d85694fcf772f6d602fd9709318b08b96328 (patch) | |
tree | 8117476e6ff0e8d6ab0a411a02aec53789932353 /test/SemaTemplate | |
parent | 601d2ee8dd783503f9d556e1ed3b107abf196a1e (diff) | |
download | clang-f1f6d85694fcf772f6d602fd9709318b08b96328.tar.gz |
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
Diffstat (limited to 'test/SemaTemplate')
-rw-r--r-- | test/SemaTemplate/instantiate-expr-4.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<ArrowWrapper<MemIntFunc*>, int (*)(int)>; template struct ArrowMemRef0<ArrowWrapper<MemInt*>, float&>; // expected-note{{instantiation}} template struct ArrowMemRef0<ArrowWrapper<ArrowWrapper<MemInt*> >, int&>; +struct UnresolvedMemRefArray { + int f(int); + int f(char); +}; +UnresolvedMemRefArray Arr[10]; +template<typename U> int UnresolvedMemRefArrayT(U u) { + return Arr->f(u); +} +template int UnresolvedMemRefArrayT<int>(int); + // FIXME: we should be able to return a MemInt without the reference! MemInt &createMemInt(int); |