您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ EXPR_LOCATION函数代码示例

51自学网 2021-06-01 20:36:20
  C++
这篇教程C++ EXPR_LOCATION函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中EXPR_LOCATION函数的典型用法代码示例。如果您正苦于以下问题:C++ EXPR_LOCATION函数的具体用法?C++ EXPR_LOCATION怎么用?C++ EXPR_LOCATION使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了EXPR_LOCATION函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: cilk_recognize_spawn

boolcilk_recognize_spawn (tree exp, tree *exp0){  bool spawn_found = false;  if (TREE_CODE (exp) == CILK_SPAWN_STMT)    {      /* Remove the CALL_EXPR from CILK_SPAWN_STMT wrapper.  */      exp = CILK_SPAWN_FN (exp);      walk_tree (exp0, unwrap_cilk_spawn_stmt, NULL, NULL);      spawn_found = true;    }  /* _Cilk_spawn can't be wrapped in expression such as PLUS_EXPR.  */  else if (contains_cilk_spawn_stmt (exp))    {      location_t loc = EXPR_LOCATION (exp);      if (loc == UNKNOWN_LOCATION)	{	  tree stmt = walk_tree (&exp,				 contains_cilk_spawn_stmt_walker,				 NULL,				 NULL);	  gcc_assert (stmt != NULL_TREE);	  loc = EXPR_LOCATION (stmt);	}      error_at (loc, "invalid use of %<_Cilk_spawn%>");    }  return spawn_found;}
开发者ID:erikvarga,项目名称:gcc,代码行数:28,


示例2: genericize_do_stmt

static voidgenericize_do_stmt (tree *stmt_p, int *walk_subtrees, void *data){  tree stmt = *stmt_p;  genericize_cp_loop (stmt_p, EXPR_LOCATION (stmt), DO_COND (stmt),		      DO_BODY (stmt), NULL_TREE, 0, walk_subtrees, data);}
开发者ID:didemoto,项目名称:gcc,代码行数:7,


示例3: genericize_while_stmt

static voidgenericize_while_stmt (tree *stmt_p, int *walk_subtrees, void *data){  tree stmt = *stmt_p;  genericize_cp_loop (stmt_p, EXPR_LOCATION (stmt), WHILE_COND (stmt),		      WHILE_BODY (stmt), NULL_TREE, 1, walk_subtrees, data);}
开发者ID:didemoto,项目名称:gcc,代码行数:7,


示例4: genericize_break_stmt

static voidgenericize_break_stmt (tree *stmt_p){  tree label = get_bc_label (bc_break);  location_t location = EXPR_LOCATION (*stmt_p);  *stmt_p = build1_loc (location, GOTO_EXPR, void_type_node, label);}
开发者ID:didemoto,项目名称:gcc,代码行数:7,


示例5: streamer_pack_tree_bitfields

voidstreamer_pack_tree_bitfields (struct output_block *ob,			      struct bitpack_d *bp, tree expr){  enum tree_code code;  code = TREE_CODE (expr);  /* Note that all these functions are highly sensitive to changes in     the types and sizes of each of the fields being packed.  */  pack_ts_base_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_INT_CST))    pack_ts_int_cst_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_REAL_CST))    pack_ts_real_cst_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_FIXED_CST))    pack_ts_fixed_cst_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_DECL_MINIMAL))    stream_output_location (ob, bp, DECL_SOURCE_LOCATION (expr));  if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON))    pack_ts_decl_common_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_DECL_WRTL))    pack_ts_decl_wrtl_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS))    pack_ts_decl_with_vis_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL))    pack_ts_function_decl_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON))    pack_ts_type_common_value_fields (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_EXP))    stream_output_location (ob, bp, EXPR_LOCATION (expr));  if (CODE_CONTAINS_STRUCT (code, TS_BLOCK))    pack_ts_block_value_fields (ob, bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_TRANSLATION_UNIT_DECL))    pack_ts_translation_unit_decl_value_fields (ob, bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_TARGET_OPTION))    pack_ts_target_option (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION))    pack_ts_optimization (bp, expr);  if (CODE_CONTAINS_STRUCT (code, TS_BINFO))    bp_pack_var_len_unsigned (bp, vec_safe_length (BINFO_BASE_ACCESSES (expr)));  if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR))    bp_pack_var_len_unsigned (bp, CONSTRUCTOR_NELTS (expr));}
开发者ID:wanws,项目名称:gcc,代码行数:60,


示例6: check_handlers

voidcheck_handlers (tree handlers){  tree_stmt_iterator i;  /* If we don't have a STATEMENT_LIST, then we've just got one     handler, and thus nothing to warn about.  */  if (TREE_CODE (handlers) != STATEMENT_LIST)    return;  i = tsi_start (handlers);  if (!tsi_end_p (i))    while (1)      {	tree handler = tsi_stmt (i);	tsi_next (&i);	/* No more handlers; nothing to shadow.  */	if (tsi_end_p (i))	  break;	if (TREE_TYPE (handler) == NULL_TREE)	  permerror (EXPR_LOCATION (handler), "%<...%>"		     " handler must be the last handler for its try block");	else	  check_handlers_1 (handler, i);      }}
开发者ID:kusumi,项目名称:DragonFlyBSD,代码行数:27,


示例7: expand_return_expr

static treeexpand_return_expr (tree expr){  tree new_mod_list, new_var, new_mod, retval_expr;  size_t rank  = 0;  location_t loc = EXPR_LOCATION (expr);  if (TREE_CODE (expr) != RETURN_EXPR)    return expr;        if (!find_rank (loc, expr, expr, false, &rank))    return error_mark_node;  /* If the return expression contains array notations, then flag it as     error.  */  if (rank >= 1)    {      error_at (loc, "array notation expression cannot be used as a return "		"value");      return error_mark_node;    }    new_mod_list = push_stmt_list ();  retval_expr = TREE_OPERAND (expr, 0);  new_var = create_temporary_var (TREE_TYPE (retval_expr));  add_decl_expr (new_var);  new_mod = expand_an_in_modify_expr (loc, new_var, NOP_EXPR,				      TREE_OPERAND (retval_expr, 1),				      tf_warning_or_error);  TREE_OPERAND (retval_expr, 1) = new_var;  TREE_OPERAND (expr, 0) = retval_expr;  add_stmt (new_mod);  add_stmt (expr);  new_mod_list = pop_stmt_list (new_mod_list);  return new_mod_list;}
开发者ID:chinabin,项目名称:gcc-tiny,代码行数:35,


示例8: cilk_install_body_with_frame_cleanup

voidcilk_install_body_with_frame_cleanup (tree fndecl, tree orig_body, void *wd){  tree frame = make_cilk_frame (fndecl);  tree dtor = create_cilk_function_exit (frame, false, false);  add_local_decl (cfun, frame);  cfun->language = ggc_cleared_alloc<language_function> ();    location_t loc = EXPR_LOCATION (orig_body);  tree list = alloc_stmt_list ();  DECL_SAVED_TREE (fndecl) = list;  tree fptr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (frame)), frame);  tree body = cilk_install_body_pedigree_operations (fptr);  gcc_assert (TREE_CODE (body) == STATEMENT_LIST);  tree detach_expr = build_call_expr (cilk_detach_fndecl, 1, fptr);  append_to_statement_list (detach_expr, &body);  cilk_outline (fndecl, &orig_body, (struct wrapper_data *) wd);  append_to_statement_list (orig_body, &body);  if (flag_exceptions)    {      tree except_flag = set_cilk_except_flag (frame);      tree except_data = set_cilk_except_data (frame);      tree catch_list = alloc_stmt_list ();      append_to_statement_list (except_flag, &catch_list);      append_to_statement_list (except_data, &catch_list);      body = create_try_catch_expr (body, catch_list);    }  append_to_statement_list (build_stmt (loc, TRY_FINALLY_EXPR, body, dtor),			    &list);}
开发者ID:CookieChen,项目名称:gcc,代码行数:31,


示例9: extract_sec_implicit_index_arg

HOST_WIDE_INTextract_sec_implicit_index_arg (location_t location, tree fn){  tree fn_arg;  HOST_WIDE_INT return_int = 0;  if (TREE_CODE (fn) == CALL_EXPR)    {      fn_arg = CALL_EXPR_ARG (fn, 0);      if (TREE_CODE (fn_arg) == INTEGER_CST)	return_int = int_cst_value (fn_arg);      else	{	  /* If the location is unknown, and if fn has a location, then use that	     information so that the user has a better idea where the error	     could be.  */	  if (location == UNKNOWN_LOCATION && EXPR_HAS_LOCATION (fn))	    location = EXPR_LOCATION (fn);	  error_at (location, "__sec_implicit_index parameter must be an " 		    "integer constant expression");	  return -1;	}    }  return return_int;}
开发者ID:chainalgit,项目名称:gcc,代码行数:25,


示例10: create_cilk_function_exit

treecreate_cilk_function_exit (tree frame, bool detaches, bool needs_sync){  tree epi = alloc_stmt_list ();  if (needs_sync)     append_to_statement_list (build_cilk_sync (), &epi);  tree func_ptr = build1 (ADDR_EXPR, cilk_frame_ptr_type_decl, frame);  tree pop_frame = build_call_expr (cilk_pop_fndecl, 1, func_ptr);  tree worker = cilk_dot (frame, CILK_TI_FRAME_WORKER, 0);  tree current = cilk_arrow (worker, CILK_TI_WORKER_CUR, 0);  tree parent = cilk_dot (frame, CILK_TI_FRAME_PARENT, 0);  tree set_current = build2 (MODIFY_EXPR, void_type_node, current, parent);  append_to_statement_list (set_current, &epi);  append_to_statement_list (pop_frame, &epi);  tree call = build_call_expr (cilk_leave_fndecl, 1, func_ptr);  if (!detaches)    {      tree flags = cilk_dot (frame, CILK_TI_FRAME_FLAGS, false);      tree flags_cmp_expr = fold_build2 (NE_EXPR, TREE_TYPE (flags), flags, 					 build_int_cst (TREE_TYPE (flags), 							CILK_FRAME_VERSION));      call = fold_build3 (COND_EXPR, void_type_node, flags_cmp_expr,			  call, build_empty_stmt (EXPR_LOCATION (flags)));    }  append_to_statement_list (call, &epi);    return epi;}
开发者ID:kito-cheng,项目名称:gcc,代码行数:28,


示例11: cpp_validate_cilk_plus_loop_aux

static treecpp_validate_cilk_plus_loop_aux (tree *tp, int *walk_subtrees, void *data){  bool *valid = (bool *) data;  location_t loc = EXPR_HAS_LOCATION (*tp) ? EXPR_LOCATION (*tp) :    UNKNOWN_LOCATION;  if (!tp || !*tp)    return NULL_TREE;  if (TREE_CODE (*tp) == THROW_EXPR)    {      error_at (loc, "throw expressions are not allowed inside loops "		"marked with pragma simd");      *walk_subtrees = 0;      *valid = false;    }  else if (TREE_CODE (*tp) == TRY_BLOCK)    {      error_at (loc, "try statements are not allowed inside loops marked "		"with #pragma simd");      *valid = false;      *walk_subtrees = 0;    }  return NULL_TREE;}  
开发者ID:CookieChen,项目名称:gcc,代码行数:26,


示例12: replace_invariant_exprs

treereplace_invariant_exprs (tree *node){  size_t ix = 0;  tree node_list = NULL_TREE;  tree t = NULL_TREE, new_var = NULL_TREE, new_node;   struct inv_list data;  data.list_values = NULL;  data.replacement = NULL;  data.additional_tcodes = NULL;  walk_tree (node, find_inv_trees, (void *)&data, NULL);  if (vec_safe_length (data.list_values))    {      node_list = push_stmt_list ();      for (ix = 0; vec_safe_iterate (data.list_values, ix, &t); ix++)	{	  new_var = build_decl (EXPR_LOCATION (t), VAR_DECL, NULL_TREE,				TREE_TYPE (t));	  gcc_assert (new_var != NULL_TREE && new_var != error_mark_node);	  new_node = build2 (MODIFY_EXPR, TREE_TYPE (t), new_var, t);	  add_stmt (new_node);	  vec_safe_push (data.replacement, new_var);	}      walk_tree (node, replace_inv_trees, (void *)&data, NULL);      node_list = pop_stmt_list (node_list);    }  return node_list;}
开发者ID:AHelper,项目名称:gcc,代码行数:30,


示例13: genericize_if_stmt

static voidgenericize_if_stmt (tree *stmt_p){  tree stmt, cond, then_, else_;  location_t locus = EXPR_LOCATION (*stmt_p);  stmt = *stmt_p;  cond = IF_COND (stmt);  then_ = THEN_CLAUSE (stmt);  else_ = ELSE_CLAUSE (stmt);  if (!then_)    then_ = build_empty_stmt ();  if (!else_)    else_ = build_empty_stmt ();  if (integer_nonzerop (cond) && !TREE_SIDE_EFFECTS (else_))    stmt = then_;  else if (integer_zerop (cond) && !TREE_SIDE_EFFECTS (then_))    stmt = else_;  else    stmt = build3 (COND_EXPR, void_type_node, cond, then_, else_);  if (CAN_HAVE_LOCATION_P (stmt) && !EXPR_HAS_LOCATION (stmt))    SET_EXPR_LOCATION (stmt, locus);  *stmt_p = stmt;}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:26,


示例14: maybe_resolve_dummy

treemaybe_resolve_dummy (tree object, bool add_capture_p){  if (!is_dummy_object (object))    return object;  tree type = TYPE_MAIN_VARIANT (TREE_TYPE (object));  gcc_assert (!TYPE_PTR_P (type));  if (type != current_class_type      && current_class_type      && LAMBDA_TYPE_P (current_class_type)      && lambda_function (current_class_type)      && DERIVED_FROM_P (type, current_nonlambda_class_type ()))    {      /* In a lambda, need to go through 'this' capture.  */      tree lam = CLASSTYPE_LAMBDA_EXPR (current_class_type);      tree cap = lambda_expr_this_capture (lam, add_capture_p);      if (cap && cap != error_mark_node)	object = build_x_indirect_ref (EXPR_LOCATION (object), cap,				       RO_NULL, tf_warning_or_error);    }  return object;}
开发者ID:nguyentu1602,项目名称:gcc,代码行数:25,


示例15: gcc_assert

voidgcc_rich_location::add_expr (tree expr){  gcc_assert (expr);  if (CAN_HAVE_RANGE_P (expr))    add_range (EXPR_LOCATION (expr), false);}
开发者ID:Droufte,项目名称:gcc,代码行数:8,


示例16: test_string_literals

static voidtest_string_literals (gimple *stmt){  gcall *call = check_for_named_call (stmt, "__emit_string_literal_range", 4);  if (!call)    return;  /* We expect an ADDR_EXPR with a STRING_CST inside it for the     initial arg.  */  tree t_addr_string = gimple_call_arg (call, 0);  if (TREE_CODE (t_addr_string) != ADDR_EXPR)    {      error_at (call->location, "string literal required for arg 1");      return;    }  tree t_string = TREE_OPERAND (t_addr_string, 0);  if (TREE_CODE (t_string) != STRING_CST)    {      error_at (call->location, "string literal required for arg 1");      return;    }  tree t_caret_idx = gimple_call_arg (call, 1);  if (TREE_CODE (t_caret_idx) != INTEGER_CST)    {      error_at (call->location, "integer constant required for arg 2");      return;    }  int caret_idx = TREE_INT_CST_LOW (t_caret_idx);  tree t_start_idx = gimple_call_arg (call, 2);  if (TREE_CODE (t_start_idx) != INTEGER_CST)    {      error_at (call->location, "integer constant required for arg 3");      return;    }  int start_idx = TREE_INT_CST_LOW (t_start_idx);  tree t_end_idx = gimple_call_arg (call, 3);  if (TREE_CODE (t_end_idx) != INTEGER_CST)    {      error_at (call->location, "integer constant required for arg 4");      return;    }  int end_idx = TREE_INT_CST_LOW (t_end_idx);  /* A STRING_CST doesn't have a location, but the ADDR_EXPR does.  */  location_t strloc = EXPR_LOCATION (t_addr_string);  location_t loc;  substring_loc substr_loc (strloc, TREE_TYPE (t_string),			    caret_idx, start_idx, end_idx);  const char *err = substr_loc.get_location (&loc);  if (err)    error_at (strloc, "unable to read substring location: %s", err);  else    emit_warning (loc);}
开发者ID:MaxKellermann,项目名称:gcc,代码行数:58,


示例17: ubsan_maybe_instrument_reference

voidubsan_maybe_instrument_reference (tree stmt){  tree op = TREE_OPERAND (stmt, 0);  op = ubsan_maybe_instrument_reference_or_call (EXPR_LOCATION (stmt), op,						 TREE_TYPE (stmt),						 UBSAN_REF_BINDING);  if (op)    TREE_OPERAND (stmt, 0) = op;}
开发者ID:WojciechMigda,项目名称:gcc,代码行数:10,


示例18: check_handlers_1

static voidcheck_handlers_1 (tree master, tree_stmt_iterator i){  tree type = TREE_TYPE (master);  for (; !tsi_end_p (i); tsi_next (&i))    {      tree handler = tsi_stmt (i);      if (TREE_TYPE (handler) && can_convert_eh (type, TREE_TYPE (handler)))	{	  warning_at (EXPR_LOCATION (handler), 0,		      "exception of type %qT will be caught",		      TREE_TYPE (handler));	  warning_at (EXPR_LOCATION (master), 0,		      "   by earlier handler for %qT", type);	  break;	}    }}
开发者ID:kusumi,项目名称:DragonFlyBSD,代码行数:19,


示例19: write_ts_exp_tree_pointers

static voidwrite_ts_exp_tree_pointers (struct output_block *ob, tree expr, bool ref_p){  int i;  streamer_write_hwi (ob, TREE_OPERAND_LENGTH (expr));  for (i = 0; i < TREE_OPERAND_LENGTH (expr); i++)    stream_write_tree (ob, TREE_OPERAND (expr, i), ref_p);  lto_output_location (ob, EXPR_LOCATION (expr));  stream_write_tree (ob, TREE_BLOCK (expr), ref_p);}
开发者ID:Samsara00,项目名称:DragonFlyBSD,代码行数:11,


示例20: TREE_OPERAND

static boolcp_ubsan_maybe_instrument_member_access     (tree stmt, cp_ubsan_check_member_access_data *ucmd){  if (DECL_ARTIFICIAL (TREE_OPERAND (stmt, 1)))    return false;  tree base = TREE_OPERAND (stmt, 0);  if (!cp_ubsan_instrument_vptr_p (TREE_TYPE (base)))    return false;  cp_walk_tree (&base, cp_ubsan_check_member_access_r, ucmd, ucmd->pset);  base = cp_ubsan_instrument_vptr (EXPR_LOCATION (stmt), base,				   TREE_TYPE (base), false,				   UBSAN_MEMBER_ACCESS);  TREE_OPERAND (stmt, 0)    = build_fold_indirect_ref_loc (EXPR_LOCATION (stmt), base);  return true;}
开发者ID:DayOperatingSystem,项目名称:Binutils,代码行数:20,


示例21: genericize_continue_stmt

static voidgenericize_continue_stmt (tree *stmt_p){  tree stmt_list = NULL;  tree pred = build_predict_expr (PRED_CONTINUE, NOT_TAKEN);  tree label = get_bc_label (bc_continue);  location_t location = EXPR_LOCATION (*stmt_p);  tree jump = build1_loc (location, GOTO_EXPR, void_type_node, label);  append_to_statement_list (pred, &stmt_list);  append_to_statement_list (jump, &stmt_list);  *stmt_p = stmt_list;}
开发者ID:didemoto,项目名称:gcc,代码行数:12,


示例22: recognize_spawn

static boolrecognize_spawn (tree exp, tree *exp0){  bool spawn_found = false;  if (TREE_CODE (exp) == CILK_SPAWN_STMT)    {      /* Remove the CALL_EXPR from CILK_SPAWN_STMT wrapper.  */      exp = CILK_SPAWN_FN (exp);      walk_tree (exp0, unwrap_cilk_spawn_stmt, NULL, NULL);      spawn_found = true;    }  /* _Cilk_spawn can't be wrapped in expression such as PLUS_EXPR.  */  else if (contains_cilk_spawn_stmt (exp))    error_at (EXPR_LOCATION (exp), "invalid use of %<_Cilk_spawn%>");  return spawn_found;}
开发者ID:kito-cheng,项目名称:gcc,代码行数:16,


示例23: ubsan_maybe_instrument_member_call

voidubsan_maybe_instrument_member_call (tree stmt, bool is_ctor){  if (call_expr_nargs (stmt) == 0)    return;  tree op = CALL_EXPR_ARG (stmt, 0);  if (op == error_mark_node      || !POINTER_TYPE_P (TREE_TYPE (op)))    return;  op = ubsan_maybe_instrument_reference_or_call (EXPR_LOCATION (stmt), op,						 TREE_TYPE (op),						 is_ctor ? UBSAN_CTOR_CALL						 : UBSAN_MEMBER_CALL);  if (op)    CALL_EXPR_ARG (stmt, 0) = op;}
开发者ID:WojciechMigda,项目名称:gcc,代码行数:16,


示例24: genericize_omp_for_stmt

static voidgenericize_omp_for_stmt (tree *stmt_p, int *walk_subtrees, void *data){  tree stmt = *stmt_p;  location_t locus = EXPR_LOCATION (stmt);  tree clab = begin_bc_block (bc_continue, locus);  cp_walk_tree (&OMP_FOR_BODY (stmt), cp_genericize_r, data, NULL);  cp_walk_tree (&OMP_FOR_CLAUSES (stmt), cp_genericize_r, data, NULL);  cp_walk_tree (&OMP_FOR_INIT (stmt), cp_genericize_r, data, NULL);  cp_walk_tree (&OMP_FOR_COND (stmt), cp_genericize_r, data, NULL);  cp_walk_tree (&OMP_FOR_INCR (stmt), cp_genericize_r, data, NULL);  cp_walk_tree (&OMP_FOR_PRE_BODY (stmt), cp_genericize_r, data, NULL);  *walk_subtrees = 0;  finish_bc_block (&OMP_FOR_BODY (stmt), bc_continue, clab);}
开发者ID:didemoto,项目名称:gcc,代码行数:17,


示例25: ubsan_maybe_instrument_reference

voidubsan_maybe_instrument_reference (tree *stmt_p){  tree stmt = *stmt_p;  tree op = stmt;  if (TREE_CODE (stmt) == NOP_EXPR)    op = TREE_OPERAND (stmt, 0);  op = ubsan_maybe_instrument_reference_or_call (EXPR_LOCATION (stmt), op,						 TREE_TYPE (stmt),						 UBSAN_REF_BINDING);  if (op)    {      if (TREE_CODE (stmt) == NOP_EXPR) 	TREE_OPERAND (stmt, 0) = op;      else	*stmt_p = op;    }}
开发者ID:KangDroid,项目名称:gcc,代码行数:18,


示例26: ubsan_maybe_instrument_array_ref

voidubsan_maybe_instrument_array_ref (tree *expr_p, bool ignore_off_by_one){  if (!ubsan_array_ref_instrumented_p (*expr_p)      && do_ubsan_in_current_function ())    {      tree op0 = TREE_OPERAND (*expr_p, 0);      tree op1 = TREE_OPERAND (*expr_p, 1);      tree e = ubsan_instrument_bounds (EXPR_LOCATION (*expr_p), op0, &op1,					ignore_off_by_one);      if (e != NULL_TREE)	{	  tree t = copy_node (*expr_p);	  TREE_OPERAND (t, 1) = build2 (COMPOUND_EXPR, TREE_TYPE (op1),					e, op1);	  *expr_p = t;	}    }}
开发者ID:WojciechMigda,项目名称:gcc,代码行数:19,


示例27: genericize_for_stmt

static voidgenericize_for_stmt (tree *stmt_p, int *walk_subtrees, void *data){  tree stmt = *stmt_p;  tree expr = NULL;  tree loop;  tree init = FOR_INIT_STMT (stmt);  if (init)    {      cp_walk_tree (&init, cp_genericize_r, data, NULL);      append_to_statement_list (init, &expr);    }  genericize_cp_loop (&loop, EXPR_LOCATION (stmt), FOR_COND (stmt),		      FOR_BODY (stmt), FOR_EXPR (stmt), 1, walk_subtrees, data);  append_to_statement_list (loop, &expr);  *stmt_p = expr;}
开发者ID:didemoto,项目名称:gcc,代码行数:19,



注:本文中的EXPR_LOCATION函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ EXT2_BLOCKS_PER_GROUP函数代码示例
C++ EXPORT_SYMBOL_GPL函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。