From 8a85a73af3367f0a64727d48fff8c69bb3c403a1 Mon Sep 17 00:00:00 2001 From: Matthew Jin <38902361+matjin@users.noreply.github.com> Date: Tue, 1 Jun 2021 02:34:26 -0700 Subject: [PATCH] Adding Support For Instof Subtype (#1447) Summary: This complements a bug fix for InferSharp in which we weren't handling type-checking correctly. Pull Request resolved: https://github.com/facebook/infer/pull/1447 Reviewed By: ngorogiannis Differential Revision: D28772069 Pulled By: jvillard fbshipit-source-id: be0210836 --- infer/src/backend/InferAnalyzeJson.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infer/src/backend/InferAnalyzeJson.ml b/infer/src/backend/InferAnalyzeJson.ml index 191c3492a..a2efa458e 100644 --- a/infer/src/backend/InferAnalyzeJson.ml +++ b/infer/src/backend/InferAnalyzeJson.ml @@ -293,8 +293,10 @@ and parse_exp (json : Safe.t) = match s with | "exact" -> Exp.Sizeof {typ= t; nbytes= None; dynamic_length= None; subtype= Subtype.exact} + | "instof" -> + Exp.Sizeof {typ= t; nbytes= None; dynamic_length= None; subtype= Subtype.subtypes_instof} | _ -> - Logging.die InternalError "Subtype in Sizeof instruction is not 'exact'" + Logging.die InternalError "Subtype in Sizeof instruction is not supported." else Logging.die InternalError "Unknown expression kind %s" ekind