Skip to content

Commit

Permalink
[clang][minor] set the location of injected destructors correctly
Browse files Browse the repository at this point in the history
Summary:
This only makes a difference in the HTML output as far as I can tell but
it was always confusing to find the destructor node at the beginning of
blocks and functions instead of at the end, where they semantically
occur.

Reviewed By: skcho

Differential Revision: D30455863

fbshipit-source-id: c66f8dced
  • Loading branch information
jvillard authored and facebook-github-bot committed Aug 23, 2021
1 parent 087c6f3 commit a65ee48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infer/src/clang/cTrans.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
if List.is_empty all_res_trans then None
else
let sil_loc =
CLocation.location_of_stmt_info context.translation_unit_context.source_file stmt_info
CLocation.location_of_stmt_info context.translation_unit_context.source_file stmt_info_loc
in
Some
(PriorityNode.compute_results_to_parent trans_state_pri sil_loc (Destruction destr_kind)
Expand Down

0 comments on commit a65ee48

Please sign in to comment.