[cfe-commits] r154624 - /cfe/trunk/test/Analysis/redefined_system.c
Anna Zaks
ganna at apple.com
Thu Apr 12 15:36:43 PDT 2012
Author: zaks
Date: Thu Apr 12 17:36:43 2012
New Revision: 154624
URL: http://llvm.org/viewvc/llvm-project?rev=154624&view=rev
Log:
[analyzer] Test case for r154451 (redefining system functions).
Added:
cfe/trunk/test/Analysis/redefined_system.c
Added: cfe/trunk/test/Analysis/redefined_system.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/redefined_system.c?rev=154624&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/redefined_system.c (added)
+++ cfe/trunk/test/Analysis/redefined_system.c Thu Apr 12 17:36:43 2012
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=unix,core,experimental.security.taint -w -verify %s
+
+// Make sure we don't crash when someone redefines a system function we reason about.
+
+char memmove ();
+char malloc();
+char system();
+char stdin();
+char memccpy();
+char free();
+char strdup();
+char atoi();
+
+int foo () {
+ return memmove() + malloc() + system + stdin() + memccpy() + free() + strdup() + atoi();
+
+}
More information about the cfe-commits
mailing list