[PATCH] Expr::IgnoreImpCasts should also ignore CXXConstructorCalls for implicit copy constructor calls

Jochen Eisinger eisinger at google.com
Wed Apr 24 07:13:32 PDT 2013


Hi klimek,

http://llvm-reviews.chandlerc.com/D720

Files:
  include/clang/AST/Expr.h

Index: include/clang/AST/Expr.h
===================================================================
--- include/clang/AST/Expr.h
+++ include/clang/AST/Expr.h
@@ -647,7 +647,7 @@
   static QualType findBoundMemberType(const Expr *expr);
 
   /// IgnoreImpCasts - Skip past any implicit casts which might
-  /// surround this expression.  Only skips ImplicitCastExprs.
+  /// surround this expression.
   Expr *IgnoreImpCasts() LLVM_READONLY;
 
   /// IgnoreImplicit - Skip past any implicit AST nodes which might
@@ -2757,7 +2757,7 @@
 inline Expr *Expr::IgnoreImpCasts() {
   Expr *e = this;
   while (ImplicitCastExpr *ice = dyn_cast<ImplicitCastExpr>(e))
-    e = ice->getSubExpr();
+    e = ice->getSubExprAsWritten();
   return e;
 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D720.1.patch
Type: text/x-patch
Size: 740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130424/ab12e4d2/attachment.bin>


More information about the cfe-commits mailing list