Fix a bug in the emission of __real/__imag l-values on scalar operands.

Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't relevant.
Make that method evaluate its operand as an l-value if it is one.
Fixes our volatile compliance in C++.

llvm-svn: 120931
This commit is contained in:
John McCall
2010-12-05 02:00:02 +00:00
parent 77a11c6174
commit a2342eb857
9 changed files with 78 additions and 75 deletions

View File

@@ -386,8 +386,7 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP,
FunctionType::ExtInfo()),
GetCopyStructFn, ReturnValueSlot(), Args);
} else if (PID->getSetterCXXAssignment()) {
EmitAnyExpr(PID->getSetterCXXAssignment(), AggValueSlot::ignored(), true);
EmitIgnoredExpr(PID->getSetterCXXAssignment());
} else {
// FIXME: Find a clean way to avoid AST node creation.
SourceLocation Loc = PD->getLocation();