-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Description
| Bugzilla Link | 9380 |
| Resolution | FIXED |
| Resolved on | Mar 02, 2011 19:01 |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor,@tkremenek |
Extended Description
The test:
struct nsCString {
~nsCString();
};
struct nsPromiseFlatCString : public nsCString {
nsPromiseFlatCString( const nsCString& str );
};
int SetStringProperty(const nsCString& aKey) {
const nsCString& flatKey = nsPromiseFlatCString(aKey);
}
produces a segmentation fault:
$ clang -cc1 -Werror=return-type nsPersistentProperties.ii
0 clang 0x0000000101092ed2 PrintStackTrace(void*) + 34
1 clang 0x0000000101093479 SignalHandler(int) + 857
2 libSystem.B.dylib 0x00007fff81dbd67a _sigtramp + 26
3 clang 0x0000000100595dc3 (anonymous namespace)::CFGBuilder::Visit(clang::Stmt*, (anonymous namespace)::AddStmtChoice) + 14835
4 clang 0x000000010058ccc1 clang::CFGImplicitDtor::getDestructorDecl() const + 113
5 clang 0x000000010058cd59 clang::CFGImplicitDtor::isNoReturn() const + 9
6 clang 0x0000000100279fa4 clang::sema::AnalysisBasedWarnings::IssueWarnings(clang::sema::AnalysisBasedWarnings::Policy, clang::sema::FunctionScopeInfo*, clang::Decl const*, clang::BlockExpr const*) + 2548
...