[cfe-commits] r41335 - /cfe/trunk/Sema/SemaExpr.cpp
Steve Naroff
snaroff at apple.com
Thu Aug 23 14:37:33 PDT 2007
Author: snaroff
Date: Thu Aug 23 16:37:33 2007
New Revision: 41335
URL: http://llvm.org/viewvc/llvm-project?rev=41335&view=rev
Log:
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;
}
Modified:
cfe/trunk/Sema/SemaExpr.cpp
Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=41335&r1=41334&r2=41335&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Thu Aug 23 16:37:33 2007
@@ -1262,14 +1262,14 @@
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...
More information about the cfe-commits
mailing list