================
Comment at: cpp11-migrate/LoopConvert/LoopActions.cpp:780
@@ +779,3 @@
+  // declared as a reference.
+  if (!VarNameFromAlias || (VarNameFromAlias && AliasVarIsRef)) {
+    // If an iterator's operator*() returns a 'T&' we can bind that to 'auto&'.
----------------
This can be simplified to just !VarNameFromAlias || AliasVarIsRef

================
Comment at: cpp11-migrate/LoopConvert/LoopActions.cpp:740
@@ -739,1 +739,3 @@
   std::string VarName;
+  bool VarNameFromAlias = Usages.size() == 1 && AliasDecl;
+  bool AliasVarIsRef = false;
----------------
I'm guessing this won't happen if a loop uses both an alias as well as the 
iterator other than to initialize the alias?


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

Reply via email to