|
|
|
@ -80,25 +80,25 @@ let rec ast_node_name an =
|
|
|
|
|
""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let rec ast_node_cxx_full_name an =
|
|
|
|
|
let full_name qual_name = "::" ^ String.concat ~sep:"::" (List.rev qual_name) in
|
|
|
|
|
let rec ast_node_cxx_fully_qualified_name an =
|
|
|
|
|
let fully_qualified_name qual_name = "::" ^ String.concat ~sep:"::" (List.rev qual_name) in
|
|
|
|
|
let open Clang_ast_t in
|
|
|
|
|
match an with
|
|
|
|
|
| Decl dec -> (
|
|
|
|
|
match Clang_ast_proj.get_named_decl_tuple dec with
|
|
|
|
|
| Some (_, n) ->
|
|
|
|
|
full_name n.Clang_ast_t.ni_qual_name
|
|
|
|
|
fully_qualified_name n.Clang_ast_t.ni_qual_name
|
|
|
|
|
| None ->
|
|
|
|
|
"" )
|
|
|
|
|
| Stmt (DeclRefExpr (_, _, _, {drti_decl_ref= Some dr})) ->
|
|
|
|
|
let ndi, _, _ = CAst_utils.get_info_from_decl_ref dr in
|
|
|
|
|
full_name ndi.ni_qual_name
|
|
|
|
|
fully_qualified_name ndi.ni_qual_name
|
|
|
|
|
| Stmt (OpaqueValueExpr (_, _, _, {ovei_source_expr= Some stmt}))
|
|
|
|
|
| Stmt (ImplicitCastExpr (_, [stmt], _, _))
|
|
|
|
|
| Stmt (PseudoObjectExpr (_, stmt :: _, _))
|
|
|
|
|
| Stmt (ParenExpr (_, [stmt], _))
|
|
|
|
|
| Stmt (CallExpr (_, stmt :: _, _)) ->
|
|
|
|
|
ast_node_cxx_full_name (Stmt stmt)
|
|
|
|
|
ast_node_cxx_fully_qualified_name (Stmt stmt)
|
|
|
|
|
| _ ->
|
|
|
|
|
""
|
|
|
|
|
|
|
|
|
|