Skip to content

Fix dropped comments in list patterns and module types #866

Merged
gpetiot merged 8 commits intoocaml-ppx:masterfrom
gpetiot:dropped-cmts
May 31, 2019
Merged

Fix dropped comments in list patterns and module types #866
gpetiot merged 8 commits intoocaml-ppx:masterfrom
gpetiot:dropped-cmts

Conversation

@gpetiot
Copy link
Copy Markdown
Collaborator

@gpetiot gpetiot commented May 29, 2019

On the way to fixing #744

Diff of test_branch: (the new position of the comments is identical to the source file)

diff --git a/infer/src/IR/Cfg.ml b/infer/src/IR/Cfg.ml
index 112e1e32e..9b1e2d591 100644
--- a/infer/src/IR/Cfg.ml
+++ b/infer/src/IR/Cfg.ml
@@ -68,14 +68,14 @@ let inline_synthetic_method ((ret_id, _) as ret) etl pdesc loc_call : Sil.instr
   in
   let do_instr instr =
     match (instr, etl) with
-    | Sil.Load (_, Exp.Lfield (Exp.Var _, fn, ft), bt, _), [(* getter for fields *) (e1, _)] ->
+    | Sil.Load (_, Exp.Lfield (Exp.Var _, fn, ft), bt, _), (* getter for fields *) [(e1, _)] ->
         let instr' = Sil.Load (ret_id, Exp.Lfield (e1, fn, ft), bt, loc_call) in
         found instr instr'
     | Sil.Load (_, Exp.Lfield (Exp.Lvar pvar, fn, ft), bt, _), [] when Pvar.is_global pvar ->
         (* getter for static fields *)
         let instr' = Sil.Load (ret_id, Exp.Lfield (Exp.Lvar pvar, fn, ft), bt, loc_call) in
         found instr instr'
-    | Sil.Store (Exp.Lfield (_, fn, ft), bt, _, _), [(* setter for fields *) (e1, _); (e2, _)] ->
+    | Sil.Store (Exp.Lfield (_, fn, ft), bt, _, _), (* setter for fields *) [(e1, _); (e2, _)] ->
         let instr' = Sil.Store (Exp.Lfield (e1, fn, ft), bt, e2, loc_call) in
         found instr instr'
     | Sil.Store (Exp.Lfield (Exp.Lvar pvar, fn, ft), bt, _, _), [(e1, _)] when Pvar.is_global pvar

@gpetiot gpetiot changed the title [WIP] Fix dropped cmt in Pmty_typeof [WIP] Fix dropped comments May 29, 2019
@gpetiot gpetiot changed the title [WIP] Fix dropped comments Fix dropped comments in list patterns and module types May 31, 2019
@gpetiot gpetiot requested a review from Julow May 31, 2019 09:58
Copy link
Copy Markdown
Collaborator

@Julow Julow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good !

@gpetiot gpetiot merged commit 4dabe7c into ocaml-ppx:master May 31, 2019
@gpetiot gpetiot deleted the dropped-cmts branch May 31, 2019 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants