No 'return' statement is not flagged
No 'return' statement is not flagged
- Subject: No 'return' statement is not flagged
- From: Randall Meadows <email@hidden>
- Date: Fri, 18 Sep 2009 14:03:24 -0600
I switched my project over to use the Clang LLVM 1.0 compiler
yesterday; today I wrote a new method, but forgot to include the
return statement (and the method is declared as return an object).
+ (Collection *)collectionWithContentsOfFile:(NSString *)path
{
NSString *collectionName = [[path lastPathComponent]
stringByDeletingPathExtension];
Collection *collection = [[Collection alloc]
initWithName:collectionName];
collection.storage = [NSDictionary
dictionaryWithContentsOfFile:path];
}
But I get no warnings when I compile this. I do with GCC 4.2, which
helpfully informs me "warning: control reaches end of non-void
function". It's not specific to class methods, also happens with
instance methods.
I looked for a compiler setting that might control this, but found
nothing; did I miss it, or is this a LLVM bug?
randy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden