This revision was automatically updated to reflect the committed changes.
steven_wu marked 2 inline comments as done.
Closed by commit rL263087: Fix false positives for for-loop-analysis warning
(authored by steven_wu).
Changed prior to commit:
http://reviews.llvm.org/D17627?vs=50212&id=50221#t
rjmccall added a comment.
Thanks, LGTM.
http://reviews.llvm.org/D17627
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steven_wu updated this revision to Diff 50212.
steven_wu updated the summary for this revision.
steven_wu added a comment.
Update according to feedback. I agree that OVE should never be null as semantics
of PseudoObjectExpr.
http://reviews.llvm.org/D17627
Files:
lib/Sema/SemaStmt.cpp
test/S
rjmccall added inline comments.
Comment at: lib/Sema/SemaStmt.cpp:1448
@@ +1447,3 @@
+if (auto *OVE = dyn_cast(S)) {
+ // Look pass OVE for Decl.
+ if (Expr *E = OVE->getSourceExpr())
"Look past the OVE into the expression it binds."
===
steven_wu updated this revision to Diff 50186.
steven_wu added a comment.
Update the patch to address John's feedback. We shouldn't even checking
ObjCSubscript but looking at the Semantics for PseudoObjectExpr only.
http://reviews.llvm.org/D17627
Files:
lib/Sema/SemaStmt.cpp
test/SemaObjC/w
rjmccall added a comment.
The right fix is probably at the PseudoObjectExpr level; you should probably be
looking at the semantic expressions instead of the syntactic.
http://reviews.llvm.org/D17627
___
cfe-commits mailing list
cfe-commits@lists.ll
steven_wu added a comment.
ping
http://reviews.llvm.org/D17627
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steven_wu updated this revision to Diff 49549.
steven_wu added a comment.
I did some more digging of the issue. It seems ObjCSubscriptRefExpr always
rebuilds and hinds both base and key behind OpaqueValueExpr. See
ObjCSubscriptOpBuilder::rebuildAndCaptureObject so it looks the AST generated
is in
steven_wu added subscribers: doug.gregor, rjmccall.
steven_wu added reviewers: rjmccall, doug.gregor.
steven_wu added a comment.
Looking through the subscript sounds fine but I would like to know if this is
indeed the only case that is being ignored because of OpaqueValueExpr and if
everything i
rtrieu added a comment.
This seems rather strange. Usually, a OpaqueValueExpr will hold an expression
that is held elsewhere in the AST. However, in this case, it appears that all
the references to --i are all behind OpaqueValueExpr's, so they aren't
processed.
`-CStyleCastExpr 0x5675d30
steven_wu created this revision.
steven_wu added reviewers: rtrieu, thakis.
steven_wu added a subscriber: cfe-commits.
-Wfor-loop-analysis was incorrectly warning about certain cases because
the DeclMatcher is not looking pass OpaqueValueExpr.
http://reviews.llvm.org/D17627
Files:
lib/Sema/Sem
11 matches
Mail list logo