1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.core -verify -triple x86_64-apple-darwin9 -Wno-incomplete-implementation %s
2 // expected-no-diagnostics
4 //===----------------------------------------------------------------------===//
5 // Delta-debugging produced forward declarations.
6 //===----------------------------------------------------------------------===//
8 typedef signed char BOOL;
9 typedef struct _NSZone NSZone;
10 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
11 @protocol NSObject - (BOOL)isEqual:(id)object;
12 @end @protocol NSCopying - (id)copyWithZone:(NSZone *)zone;
13 @end @protocol NSMutableCopying - (id)mutableCopyWithZone:(NSZone *)zone;
14 @end @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder;
15 @end @interface NSObject <NSObject> {
17 @end extern id <NSObject> NSAllocateObject(Class aClass, unsigned extraBytes, NSZone *zone);
18 @interface NSArray : NSObject <NSCopying, NSMutableCopying, NSCoding> - (unsigned)count;
19 @end @class NSTimer, NSPort, NSArray;
20 @class NSURLHandle, NSMutableArray, NSMutableData, NSData, NSURL;
21 @interface NSResponder : NSObject <NSCoding> {
23 @end @class NSBitmapImageRep, NSCursor, NSGraphicsContext, NSImage, NSPasteboard, NSScrollView, NSWindow, NSAttributedString;
24 @interface NSView : NSResponder {
29 @end @class NSTextField, NSPanel, NSArray, NSWindow, NSImage, NSButton, NSError;
30 @interface NSBox : NSView {
32 @end @class GDataFeedDocList, GDataServiceTicket, GDataServiceTicket, IHGoogleDocsAdapter;
33 @protocol IHGoogleDocsAdapterDelegate - (void)googleDocsAdapter:(IHGoogleDocsAdapter*)inGoogleDocsAdapter accountVerifyIsValid:(BOOL)inIsValid error:(NSError *)inError;
34 @end @interface IHGoogleDocsAdapter : NSObject {
37 @end extern Class const kGDataUseRegisteredClass ;
38 @interface IHGoogleDocsAdapter () - (GDataFeedDocList *)feedDocList;
39 - (NSArray *)directoryPathComponents;
40 - (unsigned int)currentPathComponentIndex;
41 - (void)setCurrentPathComponentIndex:(unsigned int)aCurrentPathComponentIndex;
42 - (NSURL *)folderFeedURL;
45 @implementation IHGoogleDocsAdapter - (id)initWithUsername:(NSString *)inUsername password:(NSString *)inPassword owner:(NSObject <IHGoogleDocsAdapterDelegate> *)owner {
49 //===----------------------------------------------------------------------===//
52 // The analyzer currently doesn't reason about ObjCKVCRefExpr. Have both
53 // ExprEngine::Visit and ExprEngine::VisitLValue have such expressions
54 // evaluate to UnknownVal.
55 //===----------------------------------------------------------------------===//
57 - (void)docListListFetchTicket:(GDataServiceTicket *)ticket finishedWithFeed:(GDataFeedDocList *)feed {
58 BOOL doGetDir = self.directoryPathComponents != 0 && self.currentPathComponentIndex < [self.directoryPathComponents count];
60 BOOL isDirExisting = [[self.feedDocList entries] count] > 0;
62 if (self.folderFeedURL != 0) {
63 if (++self.currentPathComponentIndex == [self.directoryPathComponents count]) {