From c45f7793ea161ba550115670f37a19cb619c464d Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Fri, 20 Nov 2015 07:08:59 -0800 Subject: [PATCH] Assign proper location information to children of OpaqueValueExpr Summary: public For some reason OpaqueValueExpr has extra field with subexpressions. Visit it when assigning location information Reviewed By: dulmarod Differential Revision: D2674708 fb-gh-sync-id: b91e142 --- infer/src/clang/cAstProcessor.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/infer/src/clang/cAstProcessor.ml b/infer/src/clang/cAstProcessor.ml index a514b40e7..bc86dc571 100644 --- a/infer/src/clang/cAstProcessor.ml +++ b/infer/src/clang/cAstProcessor.ml @@ -249,6 +249,11 @@ let rec stmt_process_locs loc_composer stmt = | BlockExpr (stmt_info, stmt_list, expr_info, block_decl) -> let block_decl' = decl_process_locs loc_composer block_decl in BlockExpr (stmt_info, stmt_list, expr_info, block_decl') + | OpaqueValueExpr (stmt_info, stmt_list, expr_info, opaque_value_ei) -> + let source_expr = opaque_value_ei.ovei_source_expr in + let ovei_source_expr' = Option.map (stmt_process_locs loc_composer) source_expr in + let opaque_value_ei' = { ovei_source_expr = ovei_source_expr' } in + OpaqueValueExpr (stmt_info, stmt_list, expr_info, opaque_value_ei') | stmt' -> stmt'