On Thu, Oct 18, 2012 at 1:40 AM, Logan Chien <[email protected]> wrote: > Hi, > > Here's another attempt to solve __builtin_va_arg issue. > In this patch, there is a special check for C++ and va_list as > record type: > > } else if (VaListType->isRecordType() && getLangOpts().CPlusPlus) { > // If va_list is a record type and we are compiling under C++ mode, > // then we should check the argument by copy assignment operator. > InitializedEntity Entity > = InitializedEntity::InitializeParameter(Context, > Context.getLValueReferenceType(VaListType), false); > ExprResult Init = PerformCopyInitialization(Entity, SourceLocation(), > E); > if (Init.isInvalid()) > return ExprError(); > E = Init.takeAs<Expr>(); > > With this patch, I can get the same assembly result. However, I'm not > familiar with InitializedEntity. Please have a look.
Please include a testcase where PerformCopyInitialization fails. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
