Mike Stump
6dc04f4067
Revert r91073.
...
llvm-svn: 91629
2009-12-17 22:14:41 +00:00
Daniel Dunbar
5618e98f33
Update tests to use %clang instead of 'clang', and forcibly disable use of '
...
clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to
garbage).
llvm-svn: 91460
2009-12-15 22:01:24 +00:00
Mike Stump
e1f6280093
Don't complain about falling off the end of a function with an asm
...
block, if the function is supposed to return a value as we don't know
exactly what the asm code does.
llvm-svn: 91073
2009-12-10 22:57:48 +00:00
Daniel Dunbar
633d5b3ee2
Use clang to run tests which include headers from the system.
...
llvm-svn: 89085
2009-11-17 10:14:55 +00:00
John Thompson
e413e88f2e
Fix some Window-isms to get these tests to pass on Windows.
...
llvm-svn: 85450
2009-10-29 00:10:42 +00:00
Mike Stump
d97c26921a
Be sure to turn on -fblocks.
...
llvm-svn: 77406
2009-07-29 00:17:20 +00:00
Mike Stump
bce7a27d22
Add support for -Wmissing-noreturn.
...
llvm-svn: 77391
2009-07-28 23:11:12 +00:00
Mike Stump
31d9254f7a
Ensure we can work through typedefs.
...
llvm-svn: 77265
2009-07-27 22:25:19 +00:00
Mike Stump
9e3b01f697
Add knowledge about _longjmp being noreturn.
...
llvm-svn: 77254
2009-07-27 21:45:16 +00:00
Mike Stump
9a9e0c2b17
Add builtin knowledge about longjmp being noreturn. Add printing for
...
the noreturn attribute.
llvm-svn: 77253
2009-07-27 21:33:40 +00:00
Mike Stump
ca6c875e47
Add noreturn for exit.
...
llvm-svn: 77237
2009-07-27 19:14:18 +00:00
Chris Lattner
4ead0b9e1c
add bugzilla #
...
llvm-svn: 77183
2009-07-27 04:49:58 +00:00
Mike Stump
21e0f895a1
Fix PR4624.
...
llvm-svn: 77176
2009-07-27 00:44:23 +00:00
Mike Stump
8c5d7996e8
Add noreturn as a type attribute, handle printing for them and handle
...
calls to noreturn function pointers when CFG building.
llvm-svn: 77089
2009-07-25 21:26:53 +00:00
Mike Stump
33979f75a0
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
2009-07-22 23:56:57 +00:00
Steve Naroff
a80dd1cae1
Name the "return-type" DiagGroup and reference it in a few places.
...
llvm-svn: 70500
2009-04-30 17:53:16 +00:00
Steve Naroff
62e0cb0a22
Warn about invalid return statements by default.
...
This fixes <rdar://problem/6839489> 10A345: Clang does not warm about mismatched returns (void return from a bool function)
Will implement -Wreturn-type, -Wno-return-type in another commit.
llvm-svn: 70492
2009-04-30 16:01:26 +00:00