From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp (limited to 'lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp') diff --git a/lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp b/lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp new file mode 100644 index 0000000..d9bb480 --- /dev/null +++ b/lib/StaticAnalyzer/Checkers/ExperimentalChecks.cpp @@ -0,0 +1,37 @@ +//=-- ExperimentalChecks.h ----------------------------------------*- C++ -*-=// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines functions to instantiate and register experimental +// checks in ExprEngine. +// +//===----------------------------------------------------------------------===// + +#include "InternalChecks.h" +#include "ExperimentalChecks.h" +#include "clang/StaticAnalyzer/Checkers/LocalCheckers.h" + +using namespace clang; +using namespace ento; + +void ento::RegisterExperimentalChecks(ExprEngine &Eng) { + // These are checks that never belong as internal checks + // within ExprEngine. + RegisterMallocChecker(Eng); // ArrayBoundChecker depends on this. +} + +void ento::RegisterExperimentalInternalChecks(ExprEngine &Eng) { + // These are internal checks that should eventually migrate to + // RegisterInternalChecks() once they have been further tested. + + // Note that this must be registered after ReturnStackAddresEngsChecker. + RegisterReturnPointerRangeChecker(Eng); + + RegisterArrayBoundChecker(Eng); + RegisterCastSizeChecker(Eng); +} -- cgit v1.1