diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-04-14 23:26:44 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-14 23:26:44 +0000 |
| commit | 9351c02befc53ac5ad60337b0bc3714d7bd4f3d6 (patch) | |
| tree | 60bcdbc9dee627a3e1858206e6877c4cf5e6300d /clang/lib | |
| parent | 184e65d363aa9148c3935ca445bb823e6e0d3617 (diff) | |
| download | bcm5719-llvm-9351c02befc53ac5ad60337b0bc3714d7bd4f3d6.tar.gz bcm5719-llvm-9351c02befc53ac5ad60337b0bc3714d7bd4f3d6.zip | |
Strip paren expressions when trying to diagnose "cast as lvalue"
extension.
llvm-svn: 69100
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/AST/Expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 08ab5440b16..973e662b25f 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -775,7 +775,7 @@ Expr::isModifiableLvalueResult Expr::isModifiableLvalue(ASTContext &Ctx) const { // lvalue, then this is probably a use of the old-school "cast as lvalue" // GCC extension. We don't support it, but we want to produce good // diagnostics when it happens so that the user knows why. - if (const CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(this)) + if (const CStyleCastExpr *CE = dyn_cast<CStyleCastExpr>(IgnoreParens())) if (CE->getSubExpr()->isLvalue(Ctx) == LV_Valid) return MLV_LValueCast; return MLV_InvalidExpression; |

