Skip to content

Commit

Permalink
[clang][minor] fix typo and comment formatting
Browse files Browse the repository at this point in the history
Summary: .

Reviewed By: skcho

Differential Revision: D30455861

fbshipit-source-id: a500eee24
  • Loading branch information
jvillard authored and facebook-github-bot committed Aug 23, 2021
1 parent a65ee48 commit c84faa3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions infer/src/clang/cTrans.ml
Expand Up @@ -2214,13 +2214,13 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
(* Assumption: If it's a null_stmt, it is a loop with no bound, so we set condition to 1 *)
else if is_cmp then
let open Clang_ast_t in
(* If we have a comparision here, do not dispatch it to [instruction] function, which
* invokes binaryOperator_trans_with_cond -> conditionalOperator_trans -> cond_trans.
* This will throw the translation process into an infinite loop immediately.
* Instead, dispatch to binaryOperator_trans directly. *)
(* If we have a comparison here, do not dispatch it to [instruction] function, which
invokes binaryOperator_trans_with_cond -> conditionalOperator_trans -> cond_trans.
This will throw the translation process into an infinite loop immediately. Instead,
dispatch to binaryOperator_trans directly. *)
(* If one wants to add a new kind of [BinaryOperator] that will have the same behavior,
* she need to change both the codes here and the [match] in
* binaryOperator_trans_with_cond *)
she need to change both the codes here and the [match] in
binaryOperator_trans_with_cond *)
match cond with
| BinaryOperator (si, ss, ei, boi)
| ExprWithCleanups (_, [BinaryOperator (si, ss, ei, boi)], _, _) ->
Expand Down Expand Up @@ -5202,10 +5202,10 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
(* destructor wrapper only have calls to virtual base class destructors in its body *)
, Clang_ast_t.CompoundStmt (stmt_info', []) )
else if is_destructor then
(* Injecting destructor call nodes of fields at the end of the body *)
(cxx_inject_field_destructors_in_destructor_body trans_state stmt_info, body)
else (None, body)
in
(* Injecting destructor call nodes of fields at the end of the body *)
let succ_nodes =
match destructor_res with
| Some {control= {root_nodes= _ :: _ as root_nodes}} ->
Expand Down

0 comments on commit c84faa3

Please sign in to comment.