diff options
Diffstat (limited to 'test/Analysis/gtest.cpp')
-rw-r--r-- | test/Analysis/gtest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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}} +} |