diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-16 18:56:04 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-16 18:56:04 +0000 |
| commit | 1d44608cc112ee68ee523c5664f7340e8c81c2fa (patch) | |
| tree | 466205352277dd697a2943a708ecf5ea363d01b4 /clang/test | |
| parent | 6c0da25129eb0fcf44af6724f3e81cfb1a2bb891 (diff) | |
| download | bcm5719-llvm-1d44608cc112ee68ee523c5664f7340e8c81c2fa.tar.gz bcm5719-llvm-1d44608cc112ee68ee523c5664f7340e8c81c2fa.zip | |
Make sure result type of objc++ message expression is
complete before attempting to bind it to a temporary.
Fixes PR7386.
llvm-svn: 106130
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaObjCXX/instantiate-method-return.mm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/SemaObjCXX/instantiate-method-return.mm b/clang/test/SemaObjCXX/instantiate-method-return.mm new file mode 100644 index 00000000000..b8ba4af0922 --- /dev/null +++ b/clang/test/SemaObjCXX/instantiate-method-return.mm @@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// PR7386 + +@class NSObject; + +class A; +template<class T> class V {}; + +@protocol Protocol +- (V<A*>)protocolMethod; +@end + + +@interface I<Protocol> +@end + + +@implementation I +- (void)randomMethod:(id)info { + V<A*> vec([self protocolMethod]); +} + +- (V<A*>)protocolMethod { + V<A*> va; return va; +} +@end |

