本文整理汇总了C++中Sema::CreateOverloadedUnaryOp方法的典型用法代码示例。如果您正苦于以下问题:C++ Sema::CreateOverloadedUnaryOp方法的具体用法?C++ Sema::CreateOverloadedUnaryOp怎么用?C++ Sema::CreateOverloadedUnaryOp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sema
的用法示例。
在下文中一共展示了Sema::CreateOverloadedUnaryOp方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildOperatorCoawaitCall
/// Build a call to 'operator co_await' if there is a suitable operator for
/// the given expression.
static ExprResult buildOperatorCoawaitCall(Sema &SemaRef, SourceLocation Loc,
Expr *E,
UnresolvedLookupExpr *Lookup) {
UnresolvedSet<16> Functions;
Functions.append(Lookup->decls_begin(), Lookup->decls_end());
return SemaRef.CreateOverloadedUnaryOp(Loc, UO_Coawait, Functions, E);
}
示例2: buildOperatorCoawaitCall
/// Build a call to 'operator co_await' if there is a suitable operator for
/// the given expression.
static ExprResult buildOperatorCoawaitCall(Sema &SemaRef, Scope *S,
SourceLocation Loc, Expr *E) {
UnresolvedSet<16> Functions;
SemaRef.LookupOverloadedOperatorName(OO_Coawait, S, E->getType(), QualType(),
Functions);
return SemaRef.CreateOverloadedUnaryOp(Loc, UO_Coawait, Functions, E);
}