[PATCH] D30192: [Sema] Detecting more array index out of bounds

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 27 12:46:38 PST 2017


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

A few minor nits that can be resolved when you commit, but aside from those, LGTM.



================
Comment at: lib/Sema/SemaChecking.cpp:10613
+      case Stmt::CXXOperatorCallExprClass: {
+        const CXXOperatorCallExpr *OCE = cast<CXXOperatorCallExpr>(expr);
+        for (auto Arg : OCE->arguments())
----------------
You can use `const auto *` here.


================
Comment at: lib/Sema/SemaChecking.cpp:10614
+        const CXXOperatorCallExpr *OCE = cast<CXXOperatorCallExpr>(expr);
+        for (auto Arg : OCE->arguments())
+          CheckArrayAccess(Arg);
----------------
`const auto *` instead of just `auto`.


Repository:
  rL LLVM

https://reviews.llvm.org/D30192





More information about the cfe-commits mailing list