From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/Analysis/inline4.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 clang/test/Analysis/inline4.c (limited to 'clang/test/Analysis/inline4.c') diff --git a/clang/test/Analysis/inline4.c b/clang/test/Analysis/inline4.c new file mode 100644 index 0000000..e7715e0 --- /dev/null +++ b/clang/test/Analysis/inline4.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-ipa=inlining -analyzer-store region -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; +} -- cgit v1.2.3