From: Daniel Dunbar Date: Wed, 21 Jan 2009 01:22:37 +0000 (+0000) Subject: ccc: Add --analyze test case. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18c9673c04d101e751ddaf4e7b5ba84a02988375;p=clang ccc: Add --analyze test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62654 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 'Dereference of null pointer.' %t + +void f(int *p) { + if (!p) + *p = 0; +}