[cfe-commits] r97590 - /cfe/trunk/lib/Checker/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Tue Mar 2 13:43:52 PST 2010
Author: kremenek
Date: Tue Mar 2 15:43:52 2010
New Revision: 97590
URL: http://llvm.org/viewvc/llvm-project?rev=97590&view=rev
Log:
Don't conjure a symbol for DeclStmts when the variable is a C++ reference.
Modified:
cfe/trunk/lib/Checker/GRExprEngine.cpp
Modified: cfe/trunk/lib/Checker/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/GRExprEngine.cpp?rev=97590&r1=97589&r2=97590&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Tue Mar 2 15:43:52 2010
@@ -2358,8 +2358,9 @@
// Recover some path-sensitivity if a scalar value evaluated to
// UnknownVal.
- if (InitVal.isUnknown() ||
- !getConstraintManager().canReasonAbout(InitVal)) {
+ if ((InitVal.isUnknown() ||
+ !getConstraintManager().canReasonAbout(InitVal)) &&
+ !VD->getType()->isReferenceType()) {
InitVal = ValMgr.getConjuredSymbolVal(NULL, InitEx,
Builder->getCurrentBlockCount());
}
@@ -2901,9 +2902,8 @@
if (Expr *RetE = RS->getRetValue()) {
// Record the returned expression in the state.
{
- static int Tag;
- SaveAndRestore<const void *> OldTag(Builder->Tag);
- Builder->Tag = &Tag;
+ static int Tag = 0;
+ SaveAndRestore<const void *> OldTag(Builder->Tag, &Tag);
const GRState *state = GetState(Pred);
state = state->set<ReturnExpr>(RetE);
Pred = Builder->generateNode(RetE, state, Pred);
More information about the cfe-commits
mailing list