From f40033fc5fa10d1446fad4ec55b415c513726041 Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Tue, 19 Jul 2016 08:15:09 -0700 Subject: [PATCH] Update fcp Summary: ClassTemplateSpecializationDecl now contains structures information about the specialization Reviewed By: jvillard Differential Revision: D3586446 fbshipit-source-id: d567a0b --- facebook-clang-plugins | 2 +- infer/src/clang/cFrontend_decl.ml | 2 +- infer/src/clang/cTrans.ml | 2 +- infer/src/clang/cTypes_decl.ml | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/facebook-clang-plugins b/facebook-clang-plugins index eb8d2109d..e402a68e8 160000 --- a/facebook-clang-plugins +++ b/facebook-clang-plugins @@ -1 +1 @@ -Subproject commit eb8d2109d769822ee1915a54e6be1cfb7e3fe99b +Subproject commit e402a68e82b39bede0d5f591a3a08e49ee7d2456 diff --git a/infer/src/clang/cFrontend_decl.ml b/infer/src/clang/cFrontend_decl.ml index c38e691f4..e9bc775b5 100644 --- a/infer/src/clang/cFrontend_decl.ml +++ b/infer/src/clang/cFrontend_decl.ml @@ -226,7 +226,7 @@ struct | _ -> ()); match dec with (* Currently C/C++ record decl treated in the same way *) - | ClassTemplateSpecializationDecl (_, _, _, _, decl_list, _, _, _) + | ClassTemplateSpecializationDecl (_, _, _, _, decl_list, _, _, _, _) | CXXRecordDecl (_, _, _, _, decl_list, _, _, _) | RecordDecl (_, _, _, _, decl_list, _, _) -> let is_method_decl decl = match decl with diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 4bd91a465..2c87f54ff 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -600,7 +600,7 @@ struct let open Clang_ast_t in let destruct_decl_ref_opt = match Ast_utils.get_decl_from_typ_ptr class_type_ptr with | Some CXXRecordDecl (_, _, _ , _, _, _, _, cxx_record_info) - | Some ClassTemplateSpecializationDecl (_, _, _, _, _, _, _, cxx_record_info) -> + | Some ClassTemplateSpecializationDecl (_, _, _, _, _, _, _, cxx_record_info, _) -> cxx_record_info.xrdi_destructor | _ -> None in match destruct_decl_ref_opt with diff --git a/infer/src/clang/cTypes_decl.ml b/infer/src/clang/cTypes_decl.ml index 475284af6..84b53cc39 100644 --- a/infer/src/clang/cTypes_decl.ml +++ b/infer/src/clang/cTypes_decl.ml @@ -92,7 +92,7 @@ let get_record_name_csu decl = | RecordDecl (_, name_info, opt_type, _, _, _, _) -> name_info, create_csu opt_type | CXXRecordDecl (_, name_info, _, _, _, _, _, _) - | ClassTemplateSpecializationDecl (_, name_info, _, _, _, _, _, _) -> + | ClassTemplateSpecializationDecl (_, name_info, _, _, _, _, _, _, _) -> (* we use Csu.Class for C++ because we expect Csu.Class csu from *) (* types that have methods. And in C++ struct/class/union can have methods *) name_info, Csu.Class Csu.CPP @@ -121,7 +121,7 @@ let get_superclass_decls decl = let open Clang_ast_t in match decl with | CXXRecordDecl (_, _, _, _, _, _, _, cxx_rec_info) - | ClassTemplateSpecializationDecl (_, _, _, _, _, _, _, cxx_rec_info) -> + | ClassTemplateSpecializationDecl (_, _, _, _, _, _, _, cxx_rec_info, _) -> (* there is no concept of virtual inheritance in the backend right now *) let base_ptr = cxx_rec_info.Clang_ast_t.xrdi_bases @ cxx_rec_info.Clang_ast_t.xrdi_vbases in let get_decl_or_fail typ_ptr = match Ast_utils.get_decl_from_typ_ptr typ_ptr with @@ -149,7 +149,7 @@ let add_struct_to_tenv tenv typ = let rec get_struct_fields tenv decl = let open Clang_ast_t in let decl_list = match decl with - | ClassTemplateSpecializationDecl (_, _, _, _, decl_list, _, _, _) + | ClassTemplateSpecializationDecl (_, _, _, _, decl_list, _, _, _, _) | CXXRecordDecl (_, _, _, _, decl_list, _, _, _) | RecordDecl (_, _, _, _, decl_list, _, _) -> decl_list | _ -> [] in @@ -168,7 +168,7 @@ let rec get_struct_fields tenv decl = and get_struct_cpp_class_declaration_type tenv decl = let open Clang_ast_t in match decl with - | ClassTemplateSpecializationDecl (_, _, _, type_ptr, decl_list, _, record_decl_info, _) + | ClassTemplateSpecializationDecl (_, _, _, type_ptr, decl_list, _, record_decl_info, _, _) | CXXRecordDecl (_, _, _, type_ptr, decl_list, _, record_decl_info, _) | RecordDecl (_, _, _, type_ptr, decl_list, _, record_decl_info) -> let csu, name = get_record_name_csu decl in