author | Yi Kong <yikong@google.com> | |
Fri, 21 Sep 2018 22:30:45 +0000 (15:30 -0700) | ||
committer | Yi Kong <yikong@google.com> | |
Fri, 21 Sep 2018 22:36:57 +0000 (15:36 -0700) | ||
commit | 7392175ccd5399f5a45a5b71343c9ec4b4549833 | |
tree | 30f40847dbdf35e2d404ce1ee288b9175862095a | tree | snapshot (tar.xz tar.gz zip) |
parent | c0263aa0e4dd6ce6f39521314fa638b0a7f10d66 | commit | diff |
Don't use initializer_list as return type
The underlying array may be cleaned up once its lifetime has ended,
the initializer_list would become ill-formed. Return as std::vector
instead.
This fixes "-Wreturn-stack-address" (clang) / "-Winit-list-lifetime"
(gcc) warning.
Test: mma
Bug: 111998531
Change-Id: Ie5bb6bc3d0d7689744fd573c5683b22e6fb6b178
The underlying array may be cleaned up once its lifetime has ended,
the initializer_list would become ill-formed. Return as std::vector
instead.
This fixes "-Wreturn-stack-address" (clang) / "-Winit-list-lifetime"
(gcc) warning.
Test: mma
Bug: 111998531
Change-Id: Ie5bb6bc3d0d7689744fd573c5683b22e6fb6b178