From 95cdf9d603802ef9ca66ac57ee49b75bd182fd38 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Mon, 19 Aug 2013 17:03:12 +0000 Subject: [analyzer] Don't run unreachable code checker on inlined functions. This is still an alpha checker, but we use it in certain tests to make sure something is not being executed. This should fix the buildbots. llvm-svn: 188682 --- clang/test/Analysis/unreachable-code-path.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'clang/test/Analysis/unreachable-code-path.c') diff --git a/clang/test/Analysis/unreachable-code-path.c b/clang/test/Analysis/unreachable-code-path.c index 61a4fd490e9..08019d9cbe3 100644 --- a/clang/test/Analysis/unreachable-code-path.c +++ b/clang/test/Analysis/unreachable-code-path.c @@ -139,3 +139,22 @@ void test11(enum foobar fb) { error(); // expected-warning {{never executed}} } } + +void inlined(int condition) { + if (condition) { + foo(5); // no-warning + } else { + foo(6); + } +} + +void testInlined() { + extern int coin(); + int cond = coin(); + if (!cond) { + inlined(0); + if (cond) { + foo(5); // expected-warning {{never executed}} + } + } +} -- cgit v1.2.3