diff options
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 36b88672b3..52ab62be02 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -6156,7 +6156,8 @@ QualType Sema::CheckAssignmentOperands(Expr *LHS, Expr *&RHS, // is converted to the type of the assignment expression (above). // C++ 5.17p1: the type of the assignment expression is that of its left // operand. - return LHSType.getUnqualifiedType(); + return (getLangOptions().CPlusPlus + ? LHSType : LHSType.getUnqualifiedType()); } // C99 6.5.17 |