hintonda added inline comments.

================
Comment at: 
clang-tools-extra/test/clang-tidy/modernize-loop-convert-basic.cpp:273
 
+  for (S::const_iterator It = Ss.begin(), E = Ss.end(); It != E; ++It) {
+    printf("s has value %d\n", (*It).X);
----------------
I think you need to fix the comment and add checks to these also, which is what 
the `if else` was dealing with:

   434    // V.begin() returns a user-defined type 'iterator' which, since it's
   435    // different from const_iterator, disqualifies these loops from
   436    // transformation.
   437    dependent<int> V;
   438    for (dependent<int>::const_iterator It = V.begin(), E = V.end();
   439         It != E; ++It) {
   440      printf("Fibonacci number is %d\n", *It);
   441    }
   442
   443    for (dependent<int>::const_iterator It(V.begin()), E = V.end();
   444         It != E; ++It) {
   445      printf("Fibonacci number is %d\n", *It);
   446    }
   447  }



Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61827/new/

https://reviews.llvm.org/D61827



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to