Il 16/11/2010 10:17, John McCall ha scritto: > > On Nov 16, 2010, at 12:59 AM, Enea Zaffanella wrote: > >> Il 13/11/2010 09:17, John McCall ha scritto: >>> Author: rjmccall >>> Date: Sat Nov 13 02:17:45 2010 >>> New Revision: 118993 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=118993&view=rev >>> Log: >>> Bring UsualArithmeticConversionsType back into Sema and cast the >>> operands appropriately. There are a lot of missing complex-related >>> cast kinds. >>> >>> >>> Modified: >>> cfe/trunk/include/clang/AST/ASTContext.h >>> cfe/trunk/lib/AST/ASTContext.cpp >>> cfe/trunk/lib/Sema/SemaExpr.cpp >>> >>> Modified: cfe/trunk/include/clang/AST/ASTContext.h >>> URL: >>> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTContext.h?rev=118993&r1=118992&r2=118993&view=diff >>> ============================================================================== >>> --- cfe/trunk/include/clang/AST/ASTContext.h (original) >>> +++ cfe/trunk/include/clang/AST/ASTContext.h Sat Nov 13 02:17:45 2010 >>> @@ -1304,11 +1304,6 @@ >>> >>> QualType mergeObjCGCQualifiers(QualType, QualType); >>> >>> - /// UsualArithmeticConversionsType - handles the various conversions >>> - /// that are common to binary operators (C99 6.3.1.8, C++ [expr]p9) >>> - /// and returns the result type of that conversion. >>> - QualType UsualArithmeticConversionsType(QualType lhs, QualType rhs); >>> - >> >> >> John, >> >> our application was relying on this ASTContext method. >> Is there a publicly accessible replacement? > > Well, it's not a perfect fit, but Sema::UsualArithmeticConversions is public > now, > and you can operate on OpaqueValueExprs if you really want to compute over > two opaque types. If that's not sufficient, can I ask what you're hoping to > do? > > John.
Not a perfect fit indeed (but thanks for the prompt answer!). After considering all of our uses of the method above, we noticed that we were relying on a small fragment of its implementation, so that (as far as our needs are concerned) we can workaround it by calling: bool Type::isPromotableIntegerType(); QualType ASTContext::getPromotedIntegerType(QualType); Regards, Enea. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
