[PATCH] D14198: Make the modernize-loop-convert's const-detection smarter.

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 2 08:55:02 PST 2015


klimek added inline comments.

================
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:371-374
@@ -370,1 +370,6 @@
 
+/// \brief Returns false when it can be guaranteed that no element of the
+/// container we are iterating over is going to be modified due to this
+/// expression.
+static bool canBeModified(ASTContext *Context, const Expr *E) {
+  auto Parents = Context->getParents(*E);
----------------
Not sure that is clearer. The comment should rather say what "E" is regarding the container.


http://reviews.llvm.org/D14198





More information about the cfe-commits mailing list