Skip to content

Commit

Permalink
[clang][wibble] remove wrong hdvi_ AST record prefix
Browse files Browse the repository at this point in the history
Summary:
the "hdvi" acronym is not accurate anymore, just remove the prefix
altogether since there are no clashes

Reviewed By: ngorogiannis

Differential Revision: D62442963

fbshipit-source-id: 4ac9604bd65decea8e15a513d96d518866187ddd
  • Loading branch information
jvillard authored and facebook-github-bot committed Sep 10, 2024
1 parent fa47073 commit 1256dc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion facebook-clang-plugins/libtooling/ASTExporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2154,7 +2154,7 @@ int ASTExporter<ATDWriter>::BindingDeclTupleSize() {
//@atd type binding_decl_info = {
//@atd ?binding_var: var_decl_info option;
//@atd ?bound_decl_type: qual_type option;
//@atd } <ocaml field_prefix="hvdi_">
//@atd }
template <class ATDWriter>
void ASTExporter<ATDWriter>::VisitBindingDecl(const BindingDecl *D) {
VisitValueDecl(D);
Expand Down
4 changes: 2 additions & 2 deletions infer/src/clang/cTrans.ml
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
in
let typ =
match CAst_utils.get_decl decl_ptr with
| Some (BindingDecl (_, _, _, {hvdi_bound_decl_type= Some qt})) -> (
| Some (BindingDecl (_, _, _, {bound_decl_type= Some qt})) -> (
(* clang gives us the wrong type for bindings in the AST, with missing references, we have
to go back to the BindingDecl that defines the binding to get the correct type *)
match CAst_utils.get_desugared_type qt.qt_type_ptr with
Expand Down Expand Up @@ -3265,7 +3265,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
| [] ->
None
| ( ( VarDecl (_, _, qt, vdi)
| BindingDecl (_, _, qt, Clang_ast_t.{hvdi_binding_var= Some vdi})
| BindingDecl (_, _, qt, {binding_var= Some vdi})
| VarTemplateSpecializationDecl (_, _, _, qt, vdi) ) as var_decl )
:: var_decls' ->
let res_trans_tl = aux var_decls' in
Expand Down
9 changes: 4 additions & 5 deletions infer/src/clang/cVar_decl.ml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ let sil_var_of_decl context var_decl procname =
let outer_procname = CContext.get_outer_procname context in
let open Clang_ast_t in
match var_decl with
| BindingDecl (_, name_info, _, Clang_ast_t.{hvdi_binding_var= None}) ->
| BindingDecl (_, name_info, _, {binding_var= None}) ->
mk_sil_var ~is_decomposition:false context name_info None procname outer_procname
| _ ->
let should_be_mangled =
Expand All @@ -136,8 +136,7 @@ let sil_var_of_decl context var_decl procname =
let name_info, decl_info, qual_type, var_decl_info =
match var_decl with
| VarDecl (decl_info, name_info, qual_type, var_decl_info)
| BindingDecl
(decl_info, name_info, qual_type, Clang_ast_t.{hvdi_binding_var= Some var_decl_info})
| BindingDecl (decl_info, name_info, qual_type, {binding_var= Some var_decl_info})
| DecompositionDecl (decl_info, name_info, qual_type, var_decl_info, _)
| ParmVarDecl (decl_info, name_info, qual_type, var_decl_info)
| VarTemplateSpecializationDecl (_, decl_info, name_info, qual_type, var_decl_info) ->
Expand Down Expand Up @@ -204,7 +203,7 @@ let add_var_to_locals procdesc var_decl typ pvar =
let open Clang_ast_t in
match var_decl with
| VarDecl (decl_info, _, _, vdi)
| BindingDecl (decl_info, _, _, Clang_ast_t.{hvdi_binding_var= Some vdi})
| BindingDecl (decl_info, _, _, {binding_var= Some vdi})
| DecompositionDecl (decl_info, _, _, vdi, _)
| VarTemplateSpecializationDecl (_, decl_info, _, _, vdi) ->
if not vdi.Clang_ast_t.vdi_is_global then
Expand All @@ -229,7 +228,7 @@ let add_var_to_locals procdesc var_decl typ pvar =
; has_cleanup_attribute }
in
Procdesc.append_locals procdesc [var_data]
| BindingDecl (_, _, _, Clang_ast_t.{hvdi_binding_var= None}) ->
| BindingDecl (_, _, _, {binding_var= None}) ->
()
| _ ->
assert false
Expand Down

0 comments on commit 1256dc5

Please sign in to comment.