GCC Middle and Back End API Reference
gimple-ssa-nonnull-compare.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
#include "ssa.h"
#include "diagnostic-core.h"
#include "tree-dfa.h"
Include dependency graph for gimple-ssa-nonnull-compare.cc:

Functions

static void do_warn_nonnull_compare (function *fun, tree arg)
 
gimple_opt_passmake_pass_warn_nonnull_compare (gcc::context *ctxt)
 

Function Documentation

◆ do_warn_nonnull_compare()

static void do_warn_nonnull_compare ( function * fun,
tree arg )
static
-Wnonnull-compare warning support.
   Copyright (C) 2016-2024 Free Software Foundation, Inc.
   Contributed by Jakub Jelinek <jakub@redhat.com>

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
Warn about comparison of nonnull_arg_p argument initial values
with NULL.   

References EXPR_LOC_OR_LOC, FOR_EACH_IMM_USE_FAST, ggc_alloc(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_cond_code(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_location(), integer_minus_onep(), integer_zerop(), is_gimple_assign(), nonnull_arg_p(), NULL_TREE, POINTER_TYPE_P, ssa_default_def(), TREE_CODE, TREE_OPERAND, TREE_TYPE, USE_STMT, warning_at(), and warning_suppressed_p().

◆ make_pass_warn_nonnull_compare()

gimple_opt_pass * make_pass_warn_nonnull_compare ( gcc::context * ctxt)

References ggc_alloc().