[Format] Capture `FormatStyle` by value to avoid use-after-free.
authorJordan Rupprecht <rupprecht@google.com>
Fri, 16 Dec 2022 04:38:32 +0000 (20:38 -0800)
committerJordan Rupprecht <rupprecht@google.com>
Fri, 16 Dec 2022 04:38:32 +0000 (20:38 -0800)
commit5a06334c51aa75d7f044785a495cf2de5bf13a9c
tree349c0cc9e89c5d3699a8b7510bada7050f268557
parent240e29c5015d246de7fb5e4421aa93042fada59b
[Format] Capture `FormatStyle` by value to avoid use-after-free.

Fixes the test failure in 240e29c5015d246de7fb5e4421aa93042fada59b, reported on the D140058 review thread.
clang/lib/Format/Format.cpp