fix folding of '*doubleArray'

llvm-svn: 59647
This commit is contained in:
Nuno Lopes 2008-11-19 17:44:31 +00:00
parent 7768a30c37
commit 0e33c688d5
2 changed files with 10 additions and 0 deletions

View File

@ -972,6 +972,9 @@ bool FloatExprEvaluator::VisitCallExpr(const CallExpr *E) {
}
bool FloatExprEvaluator::VisitUnaryOperator(const UnaryOperator *E) {
if (E->getOpcode() == UnaryOperator::Deref)
return false;
if (!EvaluateFloat(E->getSubExpr(), Result, Info))
return false;

View File

@ -45,3 +45,10 @@ int ola() {
if ((0, (int)a) & 2) { return 1; }
return 2;
}
// this one shouldn't fold as well
void eMaisUma() {
double t[1];
if (*t)
return;
}