[PATCH] D22190: cppcoreguidelines-pro-bounds-constant-array-index: crash for value dependent index in c++03 mode

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 13 13:10:53 PDT 2016


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

LGTM!


================
Comment at: clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp:70
@@ +69,3 @@
+  if (IndexExpr->isValueDependent())
+    return; // we check in the specialization
+
----------------
Comments should be complete sentences (capitalization and punctuation).

================
Comment at: test/clang-tidy/cppcoreguidelines-pro-bounds-constant-array-index-c++03.cpp:7
@@ +6,3 @@
+  int get() {
+    // The next line used to crash the check (in C++03 mode only)
+    return x[index];
----------------
Missing a full stop.


http://reviews.llvm.org/D22190





More information about the cfe-commits mailing list