From 461a67fa15370a9ec88f8f8a240bf7c123bb2029 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:11:37 +0000 Subject: Vendor import of clang trunk r321017: https://llvm.org/svn/llvm-project/cfe/trunk@321017 --- test/Analysis/gtest.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/Analysis/gtest.cpp') diff --git a/test/Analysis/gtest.cpp b/test/Analysis/gtest.cpp index 5797a773b423..98f415eea456 100644 --- a/test/Analysis/gtest.cpp +++ b/test/Analysis/gtest.cpp @@ -151,3 +151,17 @@ void testConstrainState(int p) { ASSERT_TRUE(false); clang_analyzer_warnIfReached(); // no-warning } + +void testAssertSymbolicPtr(const bool *b) { + ASSERT_TRUE(*b); // no-crash + + // FIXME: Our solver doesn't handle this well yet. + clang_analyzer_eval(*b); // expected-warning{{UNKNOWN}} +} + +void testAssertSymbolicRef(const bool &b) { + ASSERT_TRUE(b); // no-crash + + // FIXME: Our solver doesn't handle this well yet. + clang_analyzer_eval(b); // expected-warning{{UNKNOWN}} +} -- cgit v1.2.3