[cfe-commits] r132840 - in /cfe/trunk: lib/Analysis/AnalysisContext.cpp lib/Analysis/CFG.cpp lib/Analysis/LiveVariables.cpp lib/StaticAnalyzer/Core/Environment.cpp test/Analysis/misc-ps.c
Ted Kremenek
kremenek at apple.com
Sun Jun 12 16:57:26 PDT 2011
Hi Jordy,
I see that these are no longer needed, because we propagate the values in ExprEngine::VisitCast in these cases. While this was a bit of an optimization to avoid churn of GRStates, this is probably a worth-while simplification.
Ted
On Jun 11, 2011, at 10:47 PM, Ted Kremenek wrote:
> On Jun 10, 2011, at 1:49 AM, Jordy Rose wrote:
>
>> Modified: cfe/trunk/lib/StaticAnalyzer/Core/Environment.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/Environment.cpp?rev=132840&r1=132839&r2=132840&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/StaticAnalyzer/Core/Environment.cpp (original)
>> +++ cfe/trunk/lib/StaticAnalyzer/Core/Environment.cpp Fri Jun 10 03:49:37 2011
>> @@ -77,21 +77,6 @@
>> // For special C0xx nullptr case, make a null pointer SVal.
>> case Stmt::CXXNullPtrLiteralExprClass:
>> return svalBuilder.makeNull();
>> - case Stmt::ImplicitCastExprClass:
>> - case Stmt::CXXFunctionalCastExprClass:
>> - case Stmt::CStyleCastExprClass: {
>> - // We blast through no-op casts to get the descendant
>> - // subexpression that has a value.
>> - const CastExpr* C = cast<CastExpr>(E);
>> - QualType CT = C->getType();
>> - if (CT->isVoidType())
>> - return UnknownVal();
>> - if (C->getCastKind() == CK_NoOp) {
>> - E = C->getSubExpr();
>> - continue;
>> - }
>> - break;
>> - }
>
>
> Hi Jordy,
>
> Can't these still appear in the environment?
>
> Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110612/a87f5527/attachment.html>
More information about the cfe-commits
mailing list