================
Comment at: cpp11-migrate/LoopConvert/VariableNaming.cpp:66
@@ -64,2 +65,3 @@
 /// converter in a loop nested within SourceStmt.
 bool VariableNamer::declarationExists(const StringRef Symbol) {
+  assert(Context != 0 && "Expected an ASTContext");
----------------
Please drop the 'const' in StringRef.

================
Comment at: test/cpp11-migrate/LoopConvert/naming-alias.cpp:15-16
@@ +14,4 @@
+void aliasing() {
+  // The extra blank braces are left as a placeholder for after the variable
+  // declaration is deleted.
+  for (int i = 0; i < N; ++i) {
----------------
Use CHECK-NOT.  Current CHECK will match a partial line even when the variable 
decl is not deleted.

================
Comment at: test/cpp11-migrate/LoopConvert/naming-alias.cpp:8-9
@@ +7,4 @@
+const int N = 10;
+int nums[N];
+int sum = 0;
+
----------------
Are `nums` and `sum` used?

Also, could you add a comment explaining what is aliasing with what.  I don't 
really understand it now.

================
Comment at: test/cpp11-migrate/LoopConvert/naming-conflict.cpp:23
@@ +22,3 @@
+  // CHECK: int num = 0;
+  // CHECK-NEXT: for (auto & [[VAR:[a-z_]+]] : nums)
+  // CHECK-NEXT: printf("Fibonacci number is %d\n", [[VAR]]);
----------------
Why did you use a regex here instead of hardcoding the name, like in tests 
below?



http://llvm-reviews.chandlerc.com/D484
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to