Roll mac clang, ignore spurious lints (flutter/engine#35196)

This commit is contained in:
Zachary Anderson
2022-08-05 15:50:08 -07:00
committed by GitHub
parent c6dbfbfbd1
commit ab33453a89
8 changed files with 21 additions and 2 deletions

2
DEPS
View File

@@ -606,7 +606,7 @@ deps = {
'packages': [
{
'package': 'fuchsia/third_party/clang/mac-amd64',
'version': 'git_revision:3a20597776a5d2920e511d81653b4d2b6ca0c855'
'version': 'git_revision:d9e02a30b16ea65a7da87913c40af03e22c9571f'
}
],
'condition': 'host_os == "mac"',

View File

@@ -347,6 +347,8 @@ static void PersistentCacheStore(fml::RefPtr<fml::TaskRunner> worker,
std::shared_ptr<fml::UniqueFD> cache_directory,
std::string key,
std::unique_ptr<fml::Mapping> value) {
// The static leak checker gets confused by the use of fml::MakeCopyable.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
auto task = fml::MakeCopyable([cache_directory, //
file_name = std::move(key), //
mapping = std::move(value) //

View File

@@ -233,7 +233,9 @@ void EncodeImageAndInvokeDataCallback(
[callback = std::move(callback)](sk_sp<SkData> encoded) mutable {
InvokeDataCallback(std::move(callback), std::move(encoded));
});
// The static leak checker gets confused by the use of fml::MakeCopyable in
// EncodeImage.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
auto encode_task = [callback_task = std::move(callback_task), format,
ui_task_runner](sk_sp<SkImage> raster_image) {
sk_sp<SkData> encoded = EncodeImage(std::move(raster_image), format);
@@ -277,6 +279,8 @@ Dart_Handle EncodeImage(CanvasImage* canvas_image,
const auto& task_runners = UIDartState::Current()->GetTaskRunners();
// The static leak checker gets confused by the use of fml::MakeCopyable.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
task_runners.GetIOTaskRunner()->PostTask(fml::MakeCopyable(
[callback = std::move(callback), image = canvas_image->image(),
image_format, ui_task_runner = task_runners.GetUITaskRunner(),

View File

@@ -169,6 +169,8 @@ void MultiFrameCodec::State::GetNextFrameAndInvokeCallback(
}
nextFrameIndex_ = (nextFrameIndex_ + 1) % frameCount_;
// The static leak checker gets confused by the use of fml::MakeCopyable.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
ui_task_runner->PostTask(fml::MakeCopyable([callback = std::move(callback),
image = std::move(image),
duration, trace_id]() mutable {

View File

@@ -136,6 +136,8 @@ Dart_Handle Picture::RasterizeToImage(
auto picture_bounds = SkISize::Make(width, height);
auto ui_task =
// The static leak checker gets confused by the use of fml::MakeCopyable.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
fml::MakeCopyable([image_callback = std::move(image_callback),
unref_queue](sk_sp<SkImage> raster_image) mutable {
auto dart_state = image_callback->dart_state().lock();

View File

@@ -958,6 +958,8 @@ void Shell::OnPlatformViewDispatchPlatformMessage(
FML_DCHECK(is_setup_);
FML_DCHECK(task_runners_.GetPlatformTaskRunner()->RunsTasksOnCurrentThread());
// The static leak checker gets confused by the use of fml::MakeCopyable.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
task_runners_.GetUITaskRunner()->PostTask(fml::MakeCopyable(
[engine = engine_->GetWeakPtr(), message = std::move(message)]() mutable {
if (engine) {
@@ -1230,6 +1232,9 @@ void Shell::OnEngineHandlePlatformMessage(
[weak_platform_message_handler =
std::weak_ptr<PlatformMessageHandler>(platform_message_handler_),
message = std::move(message), ui_task_runner]() mutable {
// The static leak checker gets confused by the use of
// fml::MakeCopyable.
// NOLINTNEXTLINE(clang-analyzer-core.CallAndMessage)
ui_task_runner->PostTask(fml::MakeCopyable(
[weak_platform_message_handler, message = std::move(message),
ui_task_runner]() mutable {

View File

@@ -398,6 +398,8 @@ InferMetalPlatformViewCreationCallback(
config->metal.present_command_queue),
metal_dispatch_table, view_embedder);
// The static leak checker gets confused by the use of fml::MakeCopyable.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
return fml::MakeCopyable(
[embedder_surface = std::move(embedder_surface), platform_dispatch_table,
external_view_embedder = view_embedder](flutter::Shell& shell) mutable {

View File

@@ -24,6 +24,8 @@ void EmbedderPlatformMessageResponse::Complete(
}
runner_->PostTask(
// The static leak checker gets confused by the use of fml::MakeCopyable.
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
fml::MakeCopyable([data = std::move(data), callback = callback_]() {
callback(data->GetMapping(), data->GetSize());
}));