[cfe-commits] r106964 - /cfe/trunk/lib/Checker/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Sat Jun 26 15:40:53 PDT 2010
Author: kremenek
Date: Sat Jun 26 17:40:52 2010
New Revision: 106964
URL: http://llvm.org/viewvc/llvm-project?rev=106964&view=rev
Log:
Allow '__extension__' to be analyzed in a lvalue context.
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=106964&r1=106963&r2=106964&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Checker/GRExprEngine.cpp Sat Jun 26 17:40:52 2010
@@ -2830,7 +2830,7 @@
return;
}
- case UnaryOperator::Plus: assert (!asLValue); // FALL-THROUGH.
+ case UnaryOperator::Plus: assert(!asLValue); // FALL-THROUGH.
case UnaryOperator::Extension: {
// Unary "+" is a no-op, similar to a parentheses. We still have places
@@ -2840,7 +2840,11 @@
Expr* Ex = U->getSubExpr()->IgnoreParens();
ExplodedNodeSet Tmp;
- Visit(Ex, Pred, Tmp);
+
+ if (asLValue)
+ VisitLValue(Ex, Pred, Tmp);
+ else
+ Visit(Ex, Pred, Tmp);
for (ExplodedNodeSet::iterator I=Tmp.begin(), E=Tmp.end(); I!=E; ++I) {
const GRState* state = GetState(*I);
More information about the cfe-commits
mailing list