Ted Kremenek | 5275561 | 2008-03-27 17:17:22 +0000 | [diff] [blame] | 1 | //== BasicObjCFoundationChecks.h - Simple Apple-Foundation checks -*- 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 BasicObjCFoundationChecks, a class that encapsulates |
| 11 | // a set of simple checks to run on Objective-C code using Apple's Foundation |
| 12 | // classes. |
| 13 | // |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
| 16 | #include "clang/Analysis/PathSensitive/ExplodedGraph.h" |
| 17 | #include "clang/Analysis/PathSensitive/GRSimpleAPICheck.h" |
Ted Kremenek | 4adc81e | 2008-08-13 04:27:00 +0000 | [diff] [blame] | 18 | #include "clang/Analysis/PathSensitive/GRState.h" |
Ted Kremenek | 5275561 | 2008-03-27 17:17:22 +0000 | [diff] [blame] | 19 | #include "clang/Analysis/PathDiagnostic.h" |
| 20 | #include "clang/AST/Expr.h" |
| 21 | #include "clang/AST/ASTContext.h" |
| 22 | #include "llvm/Support/Compiler.h" |
| 23 | |
| 24 | #ifndef LLVM_CLANG_ANALYSIS_BASICOBJCFOUNDATIONCHECKS |
| 25 | #define LLVM_CLANG_ANALYSIS_BASICOBJCFOUNDATIONCHECKS |
| 26 | |
| 27 | namespace clang { |
| 28 | |
| 29 | class GRSimpleAPICheck; |
| 30 | class ASTContext; |
Ted Kremenek | 4adc81e | 2008-08-13 04:27:00 +0000 | [diff] [blame] | 31 | class GRStateManager; |
Ted Kremenek | cf118d4 | 2009-02-04 23:49:09 +0000 | [diff] [blame] | 32 | class BugReporter; |
| 33 | class GRExprEngine; |
Ted Kremenek | 5275561 | 2008-03-27 17:17:22 +0000 | [diff] [blame] | 34 | |
Ted Kremenek | 79b4f7d | 2009-07-14 00:43:42 +0000 | [diff] [blame^] | 35 | GRSimpleAPICheck *CreateBasicObjCFoundationChecks(ASTContext& Ctx, |
Ted Kremenek | cf118d4 | 2009-02-04 23:49:09 +0000 | [diff] [blame] | 36 | BugReporter& BR); |
Ted Kremenek | 04bc876 | 2008-06-26 23:59:48 +0000 | [diff] [blame] | 37 | |
Ted Kremenek | 79b4f7d | 2009-07-14 00:43:42 +0000 | [diff] [blame^] | 38 | GRSimpleAPICheck *CreateAuditCFNumberCreate(ASTContext& Ctx, |
Ted Kremenek | cf118d4 | 2009-02-04 23:49:09 +0000 | [diff] [blame] | 39 | BugReporter& BR); |
Ted Kremenek | cfdf9b4 | 2008-09-18 21:25:13 +0000 | [diff] [blame] | 40 | |
Ted Kremenek | 79b4f7d | 2009-07-14 00:43:42 +0000 | [diff] [blame^] | 41 | GRSimpleAPICheck *CreateAuditCFRetainRelease(ASTContext& Ctx, |
| 42 | BugReporter& BR); |
| 43 | |
Ted Kremenek | cf118d4 | 2009-02-04 23:49:09 +0000 | [diff] [blame] | 44 | void RegisterNSErrorChecks(BugReporter& BR, GRExprEngine &Eng); |
Ted Kremenek | cfdf9b4 | 2008-09-18 21:25:13 +0000 | [diff] [blame] | 45 | |
Ted Kremenek | 5275561 | 2008-03-27 17:17:22 +0000 | [diff] [blame] | 46 | } // end clang namespace |
| 47 | |
| 48 | #endif |