[PATCH] Have LoopConvert use 'auto &&' where necessary

Edwin Vane edwin.vane at intel.com
Wed Mar 6 12:32:27 PST 2013


  Could we not still use auto &&? The reference collapsing rules will still deduce T&& will they not?


================
Comment at: cpp11-migrate/LoopConvert/LoopMatchers.cpp:145-146
@@ +144,4 @@
+  internal::Matcher<VarDecl> testDerefReturnsByValue =
+      hasType(
+        recordDecl(
+          hasMethod(
----------------
Dmitri Gribenko wrote:
> What if iterator has a pointer type?
This test is only used by the matcher that matches an increment expression that is an overloaded operator call to ++. If the iterator is a pointer, it detects a unary operator instead and takes a different path.


http://llvm-reviews.chandlerc.com/D500



More information about the cfe-commits mailing list