diff options
author | Mike Stump <mrs@apple.com> | 2009-07-22 23:56:57 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-07-22 23:56:57 +0000 |
commit | 33979f75a0fd85a29c3d0a70d4985a20773e8ece (patch) | |
tree | a296fe11dc38d403e333910aefe4eca6200b2f16 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | e93e46c69096c8f6ad9e61578955d60a0de59f1d (diff) | |
download | llvm-33979f75a0fd85a29c3d0a70d4985a20773e8ece.zip llvm-33979f75a0fd85a29c3d0a70d4985a20773e8ece.tar.gz llvm-33979f75a0fd85a29c3d0a70d4985a20773e8ece.tar.bz2 |
Add warning for falling off the end of a function that should return a
value. This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall). I believe there should be very few false positives, though
the most interesting case would be:
int() { bar(); }
when bar does:
bar() { while (1) ; }
Here, we assume functions return, unless they are marked with the
noreturn attribute. I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.
If anyone spots other false positives, let me know!
llvm-svn: 76821
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions