From 04d3142f6b7951c8bb93303d63a4645ce4c682c8 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Fri, 25 Aug 2017 08:24:58 -0700 Subject: [PATCH] [infer][java] translate the unsingned shift operator as standard shift operator Summary: This should not affect the analysis results so there is no need to raise an exception here. We can always add this unsigned shift operator to SIL if we want the analysis to take them into account Reviewed By: sblackshear Differential Revision: D5703792 fbshipit-source-id: 739891f --- infer/src/java/jTrans.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infer/src/java/jTrans.ml b/infer/src/java/jTrans.ml index 558f1097a..ec05e7e24 100644 --- a/infer/src/java/jTrans.ml +++ b/infer/src/java/jTrans.ml @@ -190,7 +190,7 @@ let get_binop binop = | JBir.IXor -> Binop.BXor | JBir.IUshr - -> raise (Frontend_error "Unsigned right shift operator") + -> Binop.Shiftrt | JBir.LShl -> Binop.Shiftlt | JBir.LShr @@ -202,9 +202,9 @@ let get_binop binop = | JBir.LXor -> Binop.BXor | JBir.LUshr - -> raise (Frontend_error "Unsigned right shift operator") + -> Binop.Shiftrt | JBir.CMP _ - -> raise (Frontend_error "Unsigned right shift operator") + -> raise (Frontend_error "Comparison operators") | JBir.ArrayLoad _ -> raise (Frontend_error "Array load operator")