Control flow analysis is missing for Obj-C @​try/@catch/@finally, -Wreturn-type not produced #46038
Labels
bugzilla
Issues migrated from bugzilla
clang:diagnostics
New/improved warning or error message in Clang, but not in clang-tidy or static analyzer
objective-c
Extended Description
Symptom: an Objective-C method declared as returning non-void, but without a return statement, produces no warning if the method contains an Obj-C exception handling block.
(int)foo {
// Missing return, -Wreturn-type is produced
}
(int)bar {
@try { }
@finally { }
// Missing return but no warning!
}
Root cause:
CFGBuilder simply does not have an implementation for ObjCAtTryStmt, ObjCAtCatchStmt, etc. It's been missing for 11 years.
There was briefly partial support:
89cc8ea
But it was removed:
89be652
The text was updated successfully, but these errors were encountered: