diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-07-15 17:07:12 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-07-15 17:07:12 +0000 |
commit | f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8 (patch) | |
tree | 5e946d69177464379cb1a38ac18206180d763639 /test/SemaObjC/method-sentinel-attr.m | |
parent | 1928da94b55683957759d5c5ff4593a118773394 (diff) | |
download | FreeBSD-src-f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8.zip FreeBSD-src-f1752835b9d5f0da31f34b18c9f1eb8dcb799ba8.tar.gz |
Update clang to r108428.
Diffstat (limited to 'test/SemaObjC/method-sentinel-attr.m')
-rw-r--r-- | test/SemaObjC/method-sentinel-attr.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaObjC/method-sentinel-attr.m b/test/SemaObjC/method-sentinel-attr.m index 08358cc..6ec362f 100644 --- a/test/SemaObjC/method-sentinel-attr.m +++ b/test/SemaObjC/method-sentinel-attr.m @@ -15,6 +15,12 @@ - (void) foo10 : (int)x, ... __attribute__ ((__sentinel__(1,1))); - (void) foo11 : (int)x, ... __attribute__ ((__sentinel__(1,1,3))); // expected-error {{attribute requires 0, 1 or 2 argument(s)}} - (void) foo12 : (int)x, ... ATTR; // expected-note {{method has been explicitly marked sentinel here}} + +// rdar:// 7975788 +- (id) foo13 : (id)firstObj, ... __attribute__((sentinel(0,1))); +- (id) foo14 : (id)firstObj : (Class)secondObj, ... __attribute__((sentinel(0,1))); +- (id) foo15 : (id*)firstObj, ... __attribute__((sentinel(0,1))); +- (id) foo16 : (id**)firstObj, ... __attribute__((sentinel(0,1))); @end int main () @@ -33,5 +39,11 @@ int main () [p foo7:1, NULL]; // ok [p foo12:1]; // expected-warning {{not enough variable arguments in 'foo12:' declaration to fit a sentinel}} + + // rdar:// 7975788 + [ p foo13 : NULL]; + [ p foo14 : 0 : NULL]; + [ p foo16 : NULL]; + [ p foo15 : NULL]; } |