diff options
| author | Ted Kremenek <kremenek@apple.com> | 2012-09-26 06:00:14 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2012-09-26 06:00:14 +0000 |
| commit | a808e165b23cfe52006d74fd0b1e4dc95ebf338d (patch) | |
| tree | 09fdfdd54b1667272ffa71328bdd06f96e166a58 /clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp | |
| parent | ca496f34a26a7b6d47d924242c567077b09a6662 (diff) | |
| download | bcm5719-llvm-a808e165b23cfe52006d74fd0b1e4dc95ebf338d.tar.gz bcm5719-llvm-a808e165b23cfe52006d74fd0b1e4dc95ebf338d.zip | |
Remove unnecessary ASTContext& parameter from SymExpr::getType().
llvm-svn: 164661
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp index bfd55f7dde4..052075695b0 100644 --- a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp +++ b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp @@ -140,7 +140,7 @@ ProgramStateRef SimpleConstraintManager::assumeAuxForSymbol(ProgramStateRef State, SymbolRef Sym, bool Assumption) { BasicValueFactory &BVF = getBasicVals(); - QualType T = Sym->getType(BVF.getContext()); + QualType T = Sym->getType(); // None of the constraint solvers currently support non-integer types. if (!T->isIntegerType()) @@ -190,7 +190,7 @@ ProgramStateRef SimpleConstraintManager::assumeAux(ProgramStateRef state, BinaryOperator::Opcode op = SE->getOpcode(); // Implicitly compare non-comparison expressions to 0. if (!BinaryOperator::isComparisonOp(op)) { - QualType T = SE->getType(BasicVals.getContext()); + QualType T = SE->getType(); const llvm::APSInt &zero = BasicVals.getValue(0, T); op = (Assumption ? BO_NE : BO_EQ); return assumeSymRel(state, SE, op, zero); @@ -239,11 +239,9 @@ ProgramStateRef SimpleConstraintManager::assumeSymRel(ProgramStateRef state, assert(BinaryOperator::isComparisonOp(op) && "Non-comparison ops should be rewritten as comparisons to zero."); - BasicValueFactory &BVF = getBasicVals(); - ASTContext &Ctx = BVF.getContext(); - // Get the type used for calculating wraparound. - APSIntType WraparoundType = BVF.getAPSIntType(LHS->getType(Ctx)); + BasicValueFactory &BVF = getBasicVals(); + APSIntType WraparoundType = BVF.getAPSIntType(LHS->getType()); // We only handle simple comparisons of the form "$sym == constant" // or "($sym+constant1) == constant2". |

