本文整理汇总了C++中BinaryOperator::isComparisonOp方法的典型用法代码示例。如果您正苦于以下问题:C++ BinaryOperator::isComparisonOp方法的具体用法?C++ BinaryOperator::isComparisonOp怎么用?C++ BinaryOperator::isComparisonOp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BinaryOperator
的用法示例。
在下文中一共展示了BinaryOperator::isComparisonOp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StmtHelper
//.........这里部分代码省略.........
output += ", " + level + ">\n";
output += "<args";
numClosingArgsNeeded++;
callStack.push(x);
if(callStackDebug){
cerr << "pushing" << endl;
printCallStack();
}
}else if(node == "CXXConstructExpr"){
CXXConstructExpr* ce = (CXXConstructExpr*) x;
//Decl* CD = ce->getConstructor();
string filename;
//if(isInCurFile(Context, CD, filename)){
CXXMethodDecl* MD = ce->getConstructor();
output += "<calling func: ";
output += MD->getNameInfo().getAsString();
output += "," + level + ">\n";
output += "<args";
numClosingArgsNeeded++;
callStack.push(x);
if(callStackDebug){
cerr << "pushing" << endl;
printCallStack();
}
//}
}else if(node == "BinaryOperator"){
BinaryOperator* binaryOp = (BinaryOperator*) x;
if(binaryOp->isAssignmentOp()){
output += "<assignment";
}else if(binaryOp->isComparisonOp()){
output += "<comparison";
}else{
output += "<binaryOp";
}
}else if(node == "UnaryOperator"){
UnaryOperator* uo = (UnaryOperator*) x;
string op = uo->getOpcodeStr(uo->getOpcode()).str();
if(op != "-"){
output += "<unaryOp";
}
}else if(node == "CompoundAssignOperator"){
output += "<augAssign";
}else if(node == "CompoundStmt"){
if(isElse){
output += "<elseStatement";
}else{
output += "<compoundStmt";
}
}else if(node == "CXXThrowExpr"){
output += "<raisingException";
}else if(node == "CXXTryStmt"){
output += "<try";
}else if(node == "CXXCatchStmt"){
output += "<except";
}else if(node == "CXXOperatorCallExpr"){
CXXOperatorCallExpr* ce = (CXXOperatorCallExpr*) x;
if(ce->isAssignmentOp()){
output += "<assignment";
}
}else if(node == "CXXTemporaryObjectExpr"){
CXXTemporaryObjectExpr* ce = (CXXTemporaryObjectExpr*) x;
Decl* CD = ce->getConstructor();