[PATCH] D14203: [analyzer] Improve pointer arithmetic checker.

Devin Coughlin via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 22 09:30:51 PST 2016


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

Other than a suggested diagnostic rewording to consider, looks good to me. Thanks Gábor!


================
Comment at: lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp:198
@@ +197,3 @@
+          new BuiltinBug(this, "Dangerous pointer arithmetic",
+                         "Pointer arithmetic done on non-array variables means "
+                         "reliance on memory layout, which is dangerous."));
----------------
Here is a suggestion to reword: "Pointer arithmetic on non-array variables relies on memory layout, which is dangerous."


http://reviews.llvm.org/D14203





More information about the cfe-commits mailing list