diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-01-21 01:22:37 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-01-21 01:22:37 +0000 |
commit | 18c9673c04d101e751ddaf4e7b5ba84a02988375 (patch) | |
tree | ce41788b6b9a6834790879db9c5751ba73674630 | |
parent | de388a56b3a9cdeeb764cc5e21ccf95b6f4fef8a (diff) |
ccc: Add --analyze test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62654 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/ccc/test/ccc/analyze.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/ccc/test/ccc/analyze.c b/tools/ccc/test/ccc/analyze.c new file mode 100644 index 0000000000..b03c6af9c1 --- /dev/null +++ b/tools/ccc/test/ccc/analyze.c @@ -0,0 +1,7 @@ +// RUN: xcc --analyze %s -o %t && +// RUN: grep '<string>Dereference of null pointer.</string>' %t + +void f(int *p) { + if (!p) + *p = 0; +} |