summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/const-eval.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix bug in the constant evaluator. Fixes PR3115.Anders Carlsson2008-11-241-0/+3
| | | | llvm-svn: 59938
* Fix for crash issues with comma operators with a void first operand, and Eli Friedman2008-11-131-0/+6
| | | | | | | | | | 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
* Backout of r59196, plus a new ICE test. Sorry if this is a Eli Friedman2008-11-131-2/+0
| | | | | | | | | | | | | | | | | | little rude; I figure it's cleaner to just back this out now so it doesn't get forgotten or mixed up with other checkins. The modification to isICE is simply wrong; I've added a test that the change to isICE breaks. I'm pretty sure the modification to tryEvaluate is also wrong. At the very least, there's some serious miscommunication going on here, as this is going in exactly the opposite direction of r59105. My understanding is that tryEvaluate is not supposed to care about side effects. That said, a lot of the clients to tryEvaluate are expecting it to enforce a no-side-effects policy, so we probably need another method that provides that guarantee. llvm-svn: 59212
* Fix bug in constant evaluation exposed by 176.gcc.Daniel Dunbar2008-11-131-0/+2
| | | | | | | | | | | | - Evaluation of , operator used bogus assumption that LHS could be evaluated as an integral expression even though its type is unspecified. This change is making isICE very permissive of the LHS in non-evaluated contexts because it is not clear what predicate we would use to reject code here. The standard didn't offer me any guidance; opinions? llvm-svn: 59196
* Some additions to tryEvaluate I've had sitting around for a while.Eli Friedman2008-11-121-0/+13
This pushes it a lot closer to being able to deal with most of the stuff CodeGen's constant expression evaluator knows how to deal with. This also fixes PR3003. The test could possibly use some improvement, but this'll work for now. Test 6 is inspired by PR3003; the other tests are mostly just designed to exercise the new code. The reason for the funny structure of the tests is that type fixing for arrays inside of structs is the only place in Sema that calls tryEvaluate, at least for the moment. llvm-svn: 59125
OpenPOWER on IntegriCloud