Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dropped comments in list patterns and module types #866

Merged
merged 8 commits into from
May 31, 2019

Conversation

gpetiot
Copy link
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
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 !

src/Fmt_ast.ml Show resolved Hide resolved
src/Fmt_ast.ml Outdated Show resolved Hide resolved
@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