[LLVMbugs] [Bug 19641] New: @try- at catch allows omitting return
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 2 11:25:08 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19641
Bug ID: 19641
Summary: @try- at catch allows omitting return
Product: clang
Version: trunk
Hardware: All
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: devteam.codafi at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
When functions, Objective-C blocks, or methods which normally require a return
type contain the @try- at catch-@finally directives, no error is emitted if a
return statement is omitted.
id f() {
@try {
} @catch (...) {
} @finally {
}
// Expected error about missing return
}
- (id)g {
@try {
id var = (^id(void) {
@try {
} @catch (...) {
} @finally {
}
// Expected error about missing return
})();
} @catch (...) {
} @finally {
}
// Expected error about missing return
}
Clang still generates code as though there were, in fact, a return value for
the function.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140502/332d2ffe/attachment.html>
More information about the llvm-bugs
mailing list