diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-11-15 22:59:22 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-11-15 22:59:22 +0000 |
commit | 18fb1665bfcb033f01d69836abf99f393866a53c (patch) | |
tree | 369e41107fa469259b2c0d7b67cc9cc94d64541b /clang/test/Analysis | |
parent | bf9f2f2c29567e3b6a0e553e18295c9370c5d626 (diff) | |
download | bcm5719-llvm-18fb1665bfcb033f01d69836abf99f393866a53c.tar.gz bcm5719-llvm-18fb1665bfcb033f01d69836abf99f393866a53c.zip |
Remove invalid assertion from CFG builder. When building the CFG pieces for a ternary '?' expression,
it is possible for the confluence block to only have a single predecessor due to calls to 'noreturn'
functions. Fixes assertion failure reported in PR 8619.
llvm-svn: 119284
Diffstat (limited to 'clang/test/Analysis')
-rw-r--r-- | clang/test/Analysis/misc-ps.m | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps.m b/clang/test/Analysis/misc-ps.m index 902bfb6aae1..029ca70d28b 100644 --- a/clang/test/Analysis/misc-ps.m +++ b/clang/test/Analysis/misc-ps.m @@ -1203,3 +1203,12 @@ Val8663544 bazR8663544() { return func(); } +// PR 8619 - Handle ternary expressions with a call to a noreturn function. +// This previously resulted in a crash. +void pr8619_noreturn(int x) __attribute__((noreturn)); + +void pr8619(int a, int b, int c) { + a ?: pr8619_noreturn(b || c); +} + + |