Created
March 17, 2011 09:49
-
-
Save PlloYNiiE/874072 to your computer and use it in GitHub Desktop.
SieveStatementPrinter::VisitBinaryOperator.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void SieveStatementPrinter::VisitBinaryOperator(BinaryOperator *E) { | |
| //Indent(level, " Visiting Binary Operator"); | |
| /* | |
| //RhsDR->getDecl(); | |
| if (E->isAssignmentOp()) { | |
| if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(E->getLHS())) { | |
| if (VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) { | |
| if (VD->hasInit()) { | |
| llvm::outs() << "----- HAS INIT" << "\n"; | |
| llvm::outs() << VD->getNameAsString() << "<<---->>" << VD->getType().getAsString() << "\n" ; | |
| } | |
| else { | |
| llvm::outs() << "+++++ NO INIT" << "\n"; | |
| llvm::outs() << VD->getNameAsString() << "<<---->>" << VD->getType().getAsString() << "\n" ; | |
| } | |
| Expr* RHS = E->getRHS()->IgnoreParenCasts(); | |
| if (DeclRefExpr* RhsDR = dyn_cast<DeclRefExpr>(RHS)) | |
| { | |
| llvm::outs() << " CASTED RHS \n"; | |
| if (VD == dyn_cast<VarDecl>(RhsDR->getDecl())) | |
| { | |
| llvm::outs() << " RhsDR == VD \n"; | |
| } | |
| } | |
| else | |
| { | |
| llvm::outs() << " CANT CAST RHS \n"; | |
| } | |
| } | |
| } | |
| } | |
| if (E->isAdditiveOp()) { | |
| llvm::outs() << " ++++++ ADD ++++ \n"; | |
| } | |
| if (E->isComparisonOp()) { | |
| llvm::outs() << " ====== COMPARE ===== \n"; | |
| } | |
| */ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment