diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-11-13 06:09:17 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-11-13 06:09:17 +0000 |
commit | 5a332ea01f2d00a0d960aecdcb6191efcf42b5ae (patch) | |
tree | 99482c24d7cc26fac2f01faeb748390b9a834af9 /clang/test/Sema/const-eval.c | |
parent | 4b27eb4d26b50b03a10b50132a0b84175a9c1134 (diff) | |
download | bcm5719-llvm-5a332ea01f2d00a0d960aecdcb6191efcf42b5ae.tar.gz bcm5719-llvm-5a332ea01f2d00a0d960aecdcb6191efcf42b5ae.zip |
Fix for crash issues with comma operators with a void first operand, and
some more bullet-proofing/enhancements for tryEvaluate. This shouldn't
cause any behavior changes except for handling cases where we were
crashing before and being able to evaluate a few more cases in tryEvaluate.
This should settle the minor mess surrounding r59196.
llvm-svn: 59224
Diffstat (limited to 'clang/test/Sema/const-eval.c')
-rw-r--r-- | clang/test/Sema/const-eval.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/const-eval.c b/clang/test/Sema/const-eval.c index f42ed2504b1..726b7cbb29f 100644 --- a/clang/test/Sema/const-eval.c +++ b/clang/test/Sema/const-eval.c @@ -11,3 +11,9 @@ struct y {int x,y;}; EVAL_EXPR(6, (int)(1+(struct y*)0)) EVAL_EXPR(7, (int)&((struct y*)0)->y) EVAL_EXPR(8, (_Bool)"asdf") +EVAL_EXPR(9, !!&x) +EVAL_EXPR(10, ((void)1, 12)) +void g0(void); +EVAL_EXPR(11, (g0(), 12)) // FIXME: This should give an error +EVAL_EXPR(12, 1.0&&2.0) +EVAL_EXPR(13, x || 3.0) |