[cfe-commits] r60793 - /cfe/trunk/test/SemaObjC/method-arg-decay.m

Steve Naroff snaroff at apple.com
Tue Dec 9 12:59:22 PST 2008


Author: snaroff
Date: Tue Dec  9 14:59:16 2008
New Revision: 60793

URL: http://llvm.org/viewvc/llvm-project?rev=60793&view=rev
Log:
Add testcase for commit r60781.

Added:
    cfe/trunk/test/SemaObjC/method-arg-decay.m

Added: cfe/trunk/test/SemaObjC/method-arg-decay.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/method-arg-decay.m?rev=60793&view=auto

==============================================================================
--- cfe/trunk/test/SemaObjC/method-arg-decay.m (added)
+++ cfe/trunk/test/SemaObjC/method-arg-decay.m Tue Dec  9 14:59:16 2008
@@ -0,0 +1,95 @@
+// RUN: clang -checker-cfref -verify %s
+typedef signed char BOOL;
+typedef int NSInteger;
+typedef unsigned int NSUInteger;
+typedef struct _NSZone NSZone;
+ at class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
+ at protocol NSObject  - (BOOL)isEqual:(id)object;
+ at end  @protocol NSCopying  - (id)copyWithZone:(NSZone *)zone;
+ at end  @protocol NSMutableCopying  - (id)mutableCopyWithZone:(NSZone *)zone;
+ at end  @protocol NSCoding  - (void)encodeWithCoder:(NSCoder *)aCoder;
+ at end    @interface NSObject <NSObject> {
+}
+ at end    extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone);
+ at interface NSValue : NSObject <NSCopying, NSCoding>  - (void)getValue:(void *)value;
+ at end       @class NSString, NSData, NSMutableData, NSMutableDictionary, NSMutableArray;
+typedef struct {
+}
+  NSFastEnumerationState;
+ at protocol NSFastEnumeration  - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len;
+ at end        @class NSString;
+typedef struct _NSRange {
+}
+  NSRange;
+ at interface NSValue (NSValueRangeExtensions)  + (NSValue *)valueWithRange:(NSRange)range;
+- (id)objectAtIndex:(NSUInteger)index;
+ at end         typedef unsigned short unichar;
+ at interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>    - (NSUInteger)length;
+ at end       @class NSArray, NSDictionary, NSString, NSError;
+ at interface NSSet : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration>  - (NSUInteger)count;
+ at end    extern NSString *NSAccessibilityRoleDescription(NSString *role, NSString *subrole)     ;
+ at interface NSResponder : NSObject <NSCoding> {
+}
+ at end    @protocol NSAnimatablePropertyContainer      - (id)animator;
+ at end  extern NSString *NSAnimationTriggerOrderIn ;
+ at interface NSView : NSResponder  <NSAnimatablePropertyContainer>  {
+}
+ at end  @class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
+ at interface NSWindowController : NSResponder <NSCoding> {
+}
+ at end @class NSArray, NSFont, NSTabViewItem;
+ at interface NSTabView : NSView {
+}
+- (NSArray *)tabViewItems;
+- (NSString *)label;
+ at end typedef enum {
+PBXNoItemChanged = 0x00,     PBXProjectItemChanged = 0x01,     PBXReferenceChanged = 0x02,     PBXGroupChanged = 0x04,     PBXTargetChanged = 0x08,     PBXBuildPhaseChanged = 0x10,     PBXBuildFileChanged = 0x20,     PBXBreakpointChanged = 0x40, }
+  PBXArchiveMask;
+ at interface PBXModule : NSWindowController {
+}
+ at end       typedef enum {
+PBXFindMatchContains,     PBXFindMatchStartsWith,     PBXFindMatchWholeWords,     PBXFindMatchEndsWith }
+  PBXFindMatchStyle;
+ at protocol PBXSelectableText  - (NSString *)selectedString;
+ at end  @protocol PBXFindableText <PBXSelectableText>    - (BOOL)findText:(NSString *)string ignoreCase:(BOOL)ignoreCase matchStyle:(PBXFindMatchStyle)matchStyle backwards:(BOOL)backwards wrap:(BOOL)wrap;
+ at end  @class PBXProjectDocument, PBXProject, PBXAttributedStatusView;
+ at interface PBXProjectModule : PBXModule <PBXFindableText> {
+}
+ at end @class PBXBookmark;
+ at protocol PBXSelectionTarget - (NSObject <PBXSelectionTarget> *) performAction:(id)action withSelection:(NSArray *)selection;
+ at end @class XCPropertyDictionary, XCPropertyCondition, XCPropertyConditionSet, XCMutablePropertyConditionSet;
+extern NSMutableArray *XCFindPossibleKeyModules(PBXModule *module, BOOL useExposedModulesOnly);
+ at interface NSString (StringUtilities) - (NSString *) trimToLength:(NSInteger)length preserveRange:(NSRange)range;
+- (id) objectOfType:(Class)type matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data;
+ at end  @class XCControlView;
+ at protocol XCDockViewHeader - (NSImage *) headerImage;
+ at end  @class XCDockableTabModule;
+ at interface XCExtendedTabView : NSTabView <XCDockViewHeader> {
+}
+ at end     @class PBXProjectDocument, PBXFileReference, PBXModule, XCWindowTool;
+ at interface XCPerspectiveModule : PBXProjectModule <PBXSelectionTarget> {
+  XCExtendedTabView *_perspectivesTabView;
+}
+- (PBXModule *) moduleForTab:(NSTabViewItem *)item;
+ at end  
+ at implementation XCPerspectiveModule    
++ (void) openForProjectDocument:(PBXProjectDocument *)projectDocument {
+}
+- (PBXModule *) type:(Class)type inPerspective:(id)perspectiveIdentifer  matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data {
+  NSArray *allItems = [_perspectivesTabView tabViewItems];
+  NSInteger i, c = [allItems count];
+  for (i = 0;
+       i < c;
+       i++) {
+    NSTabViewItem *item = [allItems objectAtIndex:i];
+    if ([[item label] isEqual:perspectiveIdentifer]) {
+      PBXProjectModule *pModule = (PBXProjectModule *)[self moduleForTab:item];
+      PBXModule *obj = [XCFindPossibleKeyModules(pModule, (BOOL)0) objectOfType:type     matchingFunction:comparator usingData:data];
+    }
+  }
+}
+- (BOOL)buffer:(char *)buf containsAnyPrompts:(char *[])prompts
+{
+ prompts++;
+ return (BOOL)0;
+}





More information about the cfe-commits mailing list