diff options
| author | Ted Kremenek <kremenek@apple.com> | 2009-03-18 23:49:26 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2009-03-18 23:49:26 +0000 |
| commit | 891642e4da9208874b082de2be6a52ada4261301 (patch) | |
| tree | 79b9d697941540cd08cc553453eaa8f88b5df55a /clang/lib/Analysis | |
| parent | 5e09283e5a046abc0f01c9ad753419c84fc4e60c (diff) | |
| download | bcm5719-llvm-891642e4da9208874b082de2be6a52ada4261301.tar.gz bcm5719-llvm-891642e4da9208874b082de2be6a52ada4261301.zip | |
Fix PR 3836 by eagerly assuming symbolic constraints returned by unary '!'.
llvm-svn: 67260
Diffstat (limited to 'clang/lib/Analysis')
| -rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 6d360ed5033..1f47bc7f331 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -394,9 +394,17 @@ void GRExprEngine::Visit(Stmt* S, NodeTy* Pred, NodeSet& Dst) { VisitLValue(cast<StringLiteral>(S), Pred, Dst); break; - case Stmt::UnaryOperatorClass: - VisitUnaryOperator(cast<UnaryOperator>(S), Pred, Dst, false); + case Stmt::UnaryOperatorClass: { + UnaryOperator *U = cast<UnaryOperator>(S); + if (EagerlyAssume && (U->getOpcode() == UnaryOperator::LNot)) { + NodeSet Tmp; + VisitUnaryOperator(U, Pred, Tmp, false); + EvalEagerlyAssume(Dst, Tmp, U); + } + else + VisitUnaryOperator(U, Pred, Dst, false); break; + } } } |

