From cb9ee662c8c037ce2b7583fc45f06cc23c5bd6a1 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Thu, 27 Jun 2019 12:19:38 -0700 Subject: [PATCH] [pulse] skip `folly::Optional::reset()` Summary: Similar to D16005395: `folly::Optional` has a boolean field to know if it needs to destroy the wrapped object and pulse ignores that completely, causing false positives each time an `Optional` is created around something with a non-trivial destructor. Reviewed By: mbouaziz Differential Revision: D16030149 fbshipit-source-id: aeed4a0b3 --- infer/src/pulse/PulseModels.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/infer/src/pulse/PulseModels.ml b/infer/src/pulse/PulseModels.ml index 795b06459..9f60e1a2d 100644 --- a/infer/src/pulse/PulseModels.ml +++ b/infer/src/pulse/PulseModels.ml @@ -194,6 +194,7 @@ module ProcNameDispatcher = struct let open ProcnameDispatcher.ProcName in make_dispatcher [ -"folly" &:: "DelayedDestruction" &:: "destroy" &--> Misc.skip + ; -"folly" &:: "Optional" &:: "reset" &--> Misc.skip ; -"folly" &:: "SocketAddress" &:: "~SocketAddress" &--> Misc.skip ; -"std" &:: "function" &:: "~function" &--> Cplusplus.delete ; -"std" &:: "function" &:: "operator()" &--> StdFunction.operator_call