diff options
Diffstat (limited to 'gcc/analyzer/known-function-manager.cc')
-rw-r--r-- | gcc/analyzer/known-function-manager.cc | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/gcc/analyzer/known-function-manager.cc b/gcc/analyzer/known-function-manager.cc index db670b8..3b645a8 100644 --- a/gcc/analyzer/known-function-manager.cc +++ b/gcc/analyzer/known-function-manager.cc @@ -18,17 +18,12 @@ 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/>. */ -#include "config.h" -#define INCLUDE_VECTOR -#include "system.h" -#include "coretypes.h" -#include "tree.h" -#include "analyzer/analyzer.h" +#include "analyzer/common.h" + #include "diagnostic-core.h" -#include "analyzer/analyzer-logging.h" #include "stringpool.h" -#include "basic-block.h" -#include "gimple.h" + +#include "analyzer/analyzer-logging.h" #include "analyzer/known-function-manager.h" #include "analyzer/region-model.h" #include "analyzer/call-details.h" @@ -97,7 +92,7 @@ known_function_manager::add (enum internal_fn ifn, The call must match all assumptions made by the known_function (such as e.g. "argument 1's type must be a pointer type"). - Return NULL if no known_function is found, or it does not match the + Return nullptr if no known_function is found, or it does not match the assumption(s). */ const known_function * @@ -108,7 +103,7 @@ known_function_manager::get_match (tree fndecl, const call_details &cd) const { if (const known_function *candidate = get_normal_builtin (DECL_FUNCTION_CODE (fndecl))) - if (gimple_builtin_call_types_compatible_p (cd.get_call_stmt (), + if (gimple_builtin_call_types_compatible_p (&cd.get_call_stmt (), fndecl)) return candidate; } @@ -127,16 +122,16 @@ known_function_manager::get_match (tree fndecl, const call_details &cd) const if (DECL_CONTEXT (fndecl) && TREE_CODE (DECL_CONTEXT (fndecl)) != TRANSLATION_UNIT_DECL) - return NULL; + return nullptr; if (tree identifier = DECL_NAME (fndecl)) if (const known_function *candidate = get_by_identifier (identifier)) if (candidate->matches_call_types_p (cd)) return candidate; - return NULL; + return nullptr; } -/* Get any known_function for IFN, or NULL. */ +/* Get any known_function for IFN, or nullptr. */ const known_function * known_function_manager::get_internal_fn (enum internal_fn ifn) const @@ -146,7 +141,7 @@ known_function_manager::get_internal_fn (enum internal_fn ifn) const } /* Get any known_function for NAME, without type-checking. - Return NULL if there isn't one. */ + Return nullptr if there isn't one. */ const known_function * known_function_manager::get_normal_builtin (enum built_in_function name) const @@ -165,7 +160,7 @@ get_normal_builtin (const builtin_known_function *builtin_kf) const } /* Get any known_function matching IDENTIFIER, without type-checking. - Return NULL if there isn't one. */ + Return nullptr if there isn't one. */ const known_function * known_function_manager::get_by_identifier (tree identifier) const @@ -175,7 +170,7 @@ known_function_manager::get_by_identifier (tree identifier) const if (slot) return *slot; else - return NULL; + return nullptr; } /* Get any known_function in C++ std:: namespace matching IDENTIFIER, without |