Prazek accepted this revision.
Prazek added a comment.
This revision is now accepted and ready to land.
Do you have some results from running it on LLVM? If nothing crashes and all
fixit are correct then LGTM.
================
Comment at: clang-tidy/modernize/ReturnBracedInitListCheck.cpp:27-32
+ auto soughtConstructExpr =
+ cxxConstructExpr(unless(isListInitialization())).bind("ctor");
+
+ auto hasConstructExpr = has(ignoringImplicit(soughtConstructExpr));
+
+ auto ctorAsArgument = materializeTemporaryExpr(
----------------
Prazek wrote:
> Uppercase
Is it worth adding new variable to save 2 characters?
================
Comment at: test/clang-tidy/modernize-return-braced-init-list.cpp:106
+Bar f8 () {
+ return {};
+}
----------------
Also add test like:
return Bar{};
(If this construct is valid)
================
Comment at: test/clang-tidy/modernize-return-braced-init-list.cpp:122
+Foo f10() {
+ return f9(Bar());
+}
----------------
also make one like
return f9(Foo());
Repository:
rL LLVM
https://reviews.llvm.org/D28768
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits