[PATCH] D17627: Fix false positives for for-loop-analysis warning

John McCall via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 9 15:15:45 PST 2016


rjmccall added inline comments.

================
Comment at: lib/Sema/SemaStmt.cpp:1448
@@ +1447,3 @@
+        if (auto *OVE = dyn_cast<OpaqueValueExpr>(S)) {
+          // Look pass OVE for Decl.
+          if (Expr *E = OVE->getSourceExpr())
----------------
"Look past the OVE into the expression it binds."

================
Comment at: lib/Sema/SemaStmt.cpp:1449
@@ +1448,3 @@
+          // Look pass OVE for Decl.
+          if (Expr *E = OVE->getSourceExpr())
+            Visit(E);
----------------
I believe this is never null.


http://reviews.llvm.org/D17627





More information about the cfe-commits mailing list