summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-17 19:51:54 +0000
committerChris Lattner <sabre@nondot.org>2008-11-17 19:51:54 +0000
commit9b3bbe9db741e3e04219723ab0a52694a2f4eb9d (patch)
tree0bd67d429965babe52bb4ad48319fe51a9615755 /clang/lib/Sema/SemaExpr.cpp
parent753567f2c1e7d11447dc06135f128fd50dee1cd1 (diff)
downloadbcm5719-llvm-9b3bbe9db741e3e04219723ab0a52694a2f4eb9d.tar.gz
bcm5719-llvm-9b3bbe9db741e3e04219723ab0a52694a2f4eb9d.zip
Implement rdar://6319320: give a good diagnostic for cases where people
are trying to use the old GCC "casts as lvalue" extension. We don't and will hopefully never support this. llvm-svn: 59460
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index a5066a8cd7f..0506b4076ef 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -2345,6 +2345,10 @@ inline QualType Sema::CheckAssignmentOperands( // C99 6.5.16.1
Diag(loc, diag::err_typecheck_non_object_not_modifiable_lvalue,
lhsType.getAsString(), lex->getSourceRange());
return QualType();
+ case Expr::MLV_LValueCast:
+ Diag(loc, diag::err_typecheck_lvalue_casts_not_supported,
+ lex->getSourceRange());
+ return QualType();
case Expr::MLV_InvalidExpression:
Diag(loc, diag::err_typecheck_expression_not_modifiable_lvalue,
lex->getSourceRange());
OpenPOWER on IntegriCloud