Argyrios Kyrtzidis | d2592a3 | 2010-12-22 18:53:44 +0000 | [diff] [blame] | 1 | //=-- ExprEngineExperimentalChecks.h ------------------------------*- C++ -*-= |
Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 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 |
Argyrios Kyrtzidis | d2592a3 | 2010-12-22 18:53:44 +0000 | [diff] [blame] | 11 | // checks in ExprEngine. |
Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Argyrios Kyrtzidis | d2592a3 | 2010-12-22 18:53:44 +0000 | [diff] [blame] | 15 | #include "ExprEngineInternalChecks.h" |
| 16 | #include "ExprEngineExperimentalChecks.h" |
Argyrios Kyrtzidis | 98cabba | 2010-12-22 18:51:49 +0000 | [diff] [blame] | 17 | #include "clang/GR/Checkers/LocalCheckers.h" |
Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 18 | |
| 19 | using namespace clang; |
Ted Kremenek | 9ef6537 | 2010-12-23 07:20:52 +0000 | [diff] [blame^] | 20 | using namespace ento; |
Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 21 | |
Ted Kremenek | 9ef6537 | 2010-12-23 07:20:52 +0000 | [diff] [blame^] | 22 | void ento::RegisterExperimentalChecks(ExprEngine &Eng) { |
Ted Kremenek | 8382cf5 | 2009-11-13 18:46:29 +0000 | [diff] [blame] | 23 | // These are checks that never belong as internal checks |
Argyrios Kyrtzidis | d2592a3 | 2010-12-22 18:53:44 +0000 | [diff] [blame] | 24 | // within ExprEngine. |
Jordy Rose | ccbf7ee | 2010-07-06 23:11:01 +0000 | [diff] [blame] | 25 | RegisterCStringChecker(Eng); |
Zhongxing Xu | 1c9e6b1 | 2010-10-10 05:45:30 +0000 | [diff] [blame] | 26 | RegisterChrootChecker(Eng); |
Tom Care | c4b5bd8 | 2010-07-23 23:04:53 +0000 | [diff] [blame] | 27 | RegisterMallocChecker(Eng); |
| 28 | RegisterPthreadLockChecker(Eng); |
| 29 | RegisterStreamChecker(Eng); |
| 30 | RegisterUnreachableCodeChecker(Eng); |
Ted Kremenek | eb94113 | 2009-11-13 01:15:47 +0000 | [diff] [blame] | 31 | } |
| 32 | |
Ted Kremenek | 9ef6537 | 2010-12-23 07:20:52 +0000 | [diff] [blame^] | 33 | void ento::RegisterExperimentalInternalChecks(ExprEngine &Eng) { |
Ted Kremenek | 8382cf5 | 2009-11-13 18:46:29 +0000 | [diff] [blame] | 34 | // These are internal checks that should eventually migrate to |
| 35 | // RegisterInternalChecks() once they have been further tested. |
| 36 | |
| 37 | // Note that this must be registered after ReturnStackAddresEngsChecker. |
| 38 | RegisterReturnPointerRangeChecker(Eng); |
Ted Kremenek | 68c9ced | 2009-11-21 17:55:24 +0000 | [diff] [blame] | 39 | |
Ted Kremenek | 8382cf5 | 2009-11-13 18:46:29 +0000 | [diff] [blame] | 40 | RegisterArrayBoundChecker(Eng); |
Tom Care | c4b5bd8 | 2010-07-23 23:04:53 +0000 | [diff] [blame] | 41 | RegisterCastSizeChecker(Eng); |
| 42 | RegisterCastToStructChecker(Eng); |
| 43 | RegisterFixedAddressChecker(Eng); |
| 44 | RegisterPointerArithChecker(Eng); |
| 45 | RegisterPointerSubChecker(Eng); |
Ted Kremenek | 8382cf5 | 2009-11-13 18:46:29 +0000 | [diff] [blame] | 46 | } |