Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 1 | //=-- GRExprEngineExperimentalChecks.h ------------------------------*- C++ -*-= |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file defines functions to instantiate and register experimental |
| 11 | // checks in GRExprEngine. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Ted Kremenek | 8382cf5 | 2009-11-13 18:46:29 +0000 | [diff] [blame] | 15 | #include "GRExprEngineInternalChecks.h" |
Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 16 | #include "GRExprEngineExperimentalChecks.h" |
| 17 | #include "clang/Analysis/LocalCheckers.h" |
| 18 | |
| 19 | using namespace clang; |
| 20 | |
Ted Kremenek | 8382cf5 | 2009-11-13 18:46:29 +0000 | [diff] [blame] | 21 | void clang::RegisterExperimentalChecks(GRExprEngine &Eng) { |
| 22 | // These are checks that never belong as internal checks |
| 23 | // within GRExprEngine. |
Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 24 | RegisterPthreadLockChecker(Eng); |
Zhongxing Xu | 7b76096 | 2009-11-13 07:25:27 +0000 | [diff] [blame] | 25 | RegisterMallocChecker(Eng); |
Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 26 | } |
| 27 | |
Ted Kremenek | 8382cf5 | 2009-11-13 18:46:29 +0000 | [diff] [blame] | 28 | void clang::RegisterExperimentalInternalChecks(GRExprEngine &Eng) { |
| 29 | // These are internal checks that should eventually migrate to |
| 30 | // RegisterInternalChecks() once they have been further tested. |
| 31 | |
| 32 | // Note that this must be registered after ReturnStackAddresEngsChecker. |
| 33 | RegisterReturnPointerRangeChecker(Eng); |
| 34 | RegisterPointerSubChecker(Eng); |
| 35 | RegisterPointerArithChecker(Eng); |
| 36 | RegisterCastToStructChecker(Eng); |
| 37 | RegisterArrayBoundChecker(Eng); |
| 38 | } |