[PATCH] D28768: [clang-tidy] Add check 'modernize-return-braced-init-list'

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 17 04:27:45 PST 2017

alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.

Comment at: test/clang-tidy/modernize-return-braced-init-list.cpp:132
+auto v1 = []() { return vector<int>({1, 2}); }();
+auto v2 = []() -> vector<int> { return vector<int>({1, 2}); }();
Please add tests with the replaced code being inside a template (both for class and function templates) with multiple instantiations. Two interesting variations are when the return expression is type dependent and when it's not.



More information about the cfe-commits mailing list