[cfe-commits] r120890 - in /cfe/trunk: include/clang/AST/ include/clang/Sema/ lib/AST/ lib/Analysis/ lib/Checker/ lib/CodeGen/ lib/Parse/ lib/Sema/ test/CodeGen/ test/CodeGenObjCXX/ test/Rewriter/ test/Sema/ test/SemaCXX/ test/SemaTemplate/
Abramo Bagnara
abramo.bagnara at gmail.com
Fri Dec 3 22:37:58 PST 2010
Il 04/12/2010 04:47, John McCall ha scritto:
> --- cfe/trunk/lib/AST/Expr.cpp (original)
> +++ cfe/trunk/lib/AST/Expr.cpp Fri Dec 3 21:47:34 2010
> @@ -824,6 +824,8 @@
> return "LValueBitCast";
> case CK_LValueToRValue:
> return "LValueToRValue";
> + case CK_GetObjCProperty:
> + return "GetObjCProperty";
> case CK_NoOp:
> return "NoOp";
> case CK_BaseToDerived:
> @@ -1722,6 +1724,24 @@
> }
> }
>
> +Expr *Expr::IgnoreParenLValueCasts() {
> + Expr *E = this;
> + while (E) {
> + if (ParenExpr *P = dyn_cast<ParenExpr>(E)) {
> + E = P->getSubExpr();
> + continue;
> + }
> + if (CastExpr *P = dyn_cast<CastExpr>(E)) {
> + if (P->getCastKind() == CK_LValueToRValue) {
> + E = P->getSubExpr();
> + continue;
> + }
> + }
> + break;
> + }
> + return E;
> +}
What about __extension__ skipping?
More information about the cfe-commits
mailing list