diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-06-26 22:40:52 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-06-26 22:40:52 +0000 |
commit | f00eac5cfff3f3ed6ed99b7f7439664ee2226910 (patch) | |
tree | 7fad2d023fcfe4b9671ec778de77af28b587ac42 /clang/lib/Checker | |
parent | 57ce97151fd5dc1c7c80bed2fc3c9c968df65af9 (diff) | |
download | bcm5719-llvm-f00eac5cfff3f3ed6ed99b7f7439664ee2226910.tar.gz bcm5719-llvm-f00eac5cfff3f3ed6ed99b7f7439664ee2226910.zip |
Allow '__extension__' to be analyzed in a lvalue context.
llvm-svn: 106964
Diffstat (limited to 'clang/lib/Checker')
-rw-r--r-- | clang/lib/Checker/GRExprEngine.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp index 0519c0f79c7..c4bf9696efa 100644 --- a/clang/lib/Checker/GRExprEngine.cpp +++ b/clang/lib/Checker/GRExprEngine.cpp @@ -2830,7 +2830,7 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, ExplodedNode* Pred, 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 @@ void GRExprEngine::VisitUnaryOperator(UnaryOperator* U, ExplodedNode* Pred, 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); |