[PATCH] Have LoopConvert use 'auto &&' where necessary
Vane, Edwin
edwin.vane at intel.com
Wed Mar 6 11:57:53 PST 2013
In this patch I'm mostly interested in your thoughts on using 'auto &&' instead of 'auto'. I first tried 'const auto &' but this introduces more cv qualification.
-----Original Message-----
From: Edwin Vane [mailto:edwin.vane at intel.com]
Sent: Wednesday, March 06, 2013 2:57 PM
To: gribozavr at gmail.com; klimek at google.com; Vane, Edwin
Cc: cfe-commits at cs.uiuc.edu
Subject: [PATCH] Have LoopConvert use 'auto &&' where necessary
Hi gribozavr, klimek,
For iterators where the dereference operator returns by value, LoopConvert should use 'auto &&' in the range-based for loop expression.
Moved test case from iterator_failing.cpp to iterator.cpp and added extra tests.
Fixes PR15437.
http://llvm-reviews.chandlerc.com/D500
Files:
cpp11-migrate/LoopConvert/LoopActions.cpp
cpp11-migrate/LoopConvert/LoopActions.h
cpp11-migrate/LoopConvert/LoopMatchers.cpp
cpp11-migrate/LoopConvert/LoopMatchers.h
test/cpp11-migrate/LoopConvert/Inputs/structures.h
test/cpp11-migrate/LoopConvert/iterator.cpp
test/cpp11-migrate/LoopConvert/iterator_failing.cpp
More information about the cfe-commits
mailing list