Remove a FIXME, allowing ++/-- on Complex types (a GCC extension).

Now, the following test case succeeds...

_Complex double x, y;
void test2(int c) {
  ++x;
}

llvm-svn: 41335
This commit is contained in:
Steve Naroff 2007-08-23 21:37:33 +00:00
parent 04cca64f8c
commit 9e1e551c01
1 changed files with 4 additions and 4 deletions

View File

@ -1262,14 +1262,14 @@ QualType Sema::CheckIncrementDecrementOperand(Expr *op, SourceLocation OpLoc) {
resType.getAsString(), op->getSourceRange());
return QualType();
}
} else if (!resType->isRealType()) {
// FIXME: Allow Complex as a GCC extension.
} else if (!resType->isRealType() && !resType->isComplexType()) {
// Allowing Complex is a GCC extension.
Diag(OpLoc, diag::err_typecheck_illegal_increment_decrement,
resType.getAsString(), op->getSourceRange());
return QualType();
}
// At this point, we know we have a real or pointer type. Now make sure
// the operand is a modifiable lvalue.
// At this point, we know we have a real, complex or pointer type.
// Now make sure the operand is a modifiable lvalue.
Expr::isModifiableLvalueResult mlval = op->isModifiableLvalue();
if (mlval != Expr::MLV_Valid) {
// FIXME: emit a more precise diagnostic...