summaryrefslogtreecommitdiffstats
path: root/test/Analysis
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-04-06 15:53:59 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-04-06 15:53:59 +0000
commit71438373cd57f0d5d8c93bb5cf690844a0fbc9d0 (patch)
tree59c928209f8007777dd96568b026bdfe200691de /test/Analysis
parentac616af773f5062edaaf1a0bb5610b49a22ac41f (diff)
downloadFreeBSD-src-71438373cd57f0d5d8c93bb5cf690844a0fbc9d0.zip
FreeBSD-src-71438373cd57f0d5d8c93bb5cf690844a0fbc9d0.tar.gz
Update clang to r100520.
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/inline4.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Analysis/inline4.c b/test/Analysis/inline4.c
new file mode 100644
index 0000000..dd2379f
--- /dev/null
+++ b/test/Analysis/inline4.c
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -analyze -inline-call -analyzer-store region -analyze-function f -verify %s
+
+int g(int a) {
+ return a;
+}
+
+int f(int a) {
+ // Do not remove block-level expression bindings of caller when analyzing
+ // in the callee.
+ if (1 && g(a)) // The binding of '1 && g(a)' which is an UndefinedVal
+ // carries important information.
+ return 1;
+ return 0;
+}
OpenPOWER on IntegriCloud