Question

I has a question about XCODE analyze command.

When a function has @try @catch, the analyze will not check this function, even there has no codes in @try @catch.

// ok
- (void) testAnalyze {
    // has tip for leak
    Actor *rb = [[Actor alloc] init];
}

// wrong
- (void) testAnalyze {
    // no tip for leak
    Actor *rb = [[Actor alloc] init];

    @try {
    }
    @catch (NSException *exception) {

    }
}

is any setting for Xcode that i set wrong?

thank you so much!

ps:My XCODE version is 4.2

Was it helpful?

Solution

@try {...} @catch {...} @finally {...} blocks are just not yet implemented in the Clang Static Analyzer: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-May/005173.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top