diff options
author | Steve Naroff <snaroff@apple.com> | 2007-11-27 17:58:44 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2007-11-27 17:58:44 +0000 |
commit | 0ee0b0ab8cb63a871cdfb6b0cfb4a8e6b433aab0 (patch) | |
tree | edb898665a58649de79654b6934cced3520c928e /clang/test/Sema/assign-null.c | |
parent | c6298de21166620409f6ab1da2373cac864d72a6 (diff) | |
download | bcm5719-llvm-0ee0b0ab8cb63a871cdfb6b0cfb4a8e6b433aab0.tar.gz bcm5719-llvm-0ee0b0ab8cb63a871cdfb6b0cfb4a8e6b433aab0.zip |
Move the null pointer constant check from Sema::CheckSingleInitializer/ActOnCallExpr/CheckMessageArgumentTypes/ActOnReturnStmt to Sema::CheckSingleAssignmentConstraints. This makes sure all null pointer assignments are considered compatible.
Thanks to Seo Sanghyeon for the bug, follow-through, and patch!
llvm-svn: 44366
Diffstat (limited to 'clang/test/Sema/assign-null.c')
-rw-r--r-- | clang/test/Sema/assign-null.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Sema/assign-null.c b/clang/test/Sema/assign-null.c new file mode 100644 index 00000000000..6972d902236 --- /dev/null +++ b/clang/test/Sema/assign-null.c @@ -0,0 +1,10 @@ +// RUN: clang -fsyntax-only -verify %s + +#include <stddef.h> + +typedef void (*hookfunc)(void *arg); +hookfunc hook; + +void clear_hook() { + hook = NULL; +} |