blob: 13f55fcb969bf6f97c4da38e19890237730ed316 [file] [log] [blame]
Ted Kremenek52755612008-03-27 17:17:22 +00001//== 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 Kremenek4adc81e2008-08-13 04:27:00 +000018#include "clang/Analysis/PathSensitive/GRState.h"
Ted Kremenek52755612008-03-27 17:17:22 +000019#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
27namespace clang {
28
29class GRSimpleAPICheck;
30class ASTContext;
Ted Kremenek4adc81e2008-08-13 04:27:00 +000031class GRStateManager;
Ted Kremenekcf118d42009-02-04 23:49:09 +000032class BugReporter;
33class GRExprEngine;
Ted Kremenek52755612008-03-27 17:17:22 +000034
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000035GRSimpleAPICheck *CreateBasicObjCFoundationChecks(ASTContext& Ctx,
Ted Kremenekcf118d42009-02-04 23:49:09 +000036 BugReporter& BR);
Ted Kremenek04bc8762008-06-26 23:59:48 +000037
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000038GRSimpleAPICheck *CreateAuditCFNumberCreate(ASTContext& Ctx,
Ted Kremenekcf118d42009-02-04 23:49:09 +000039 BugReporter& BR);
Ted Kremenekcfdf9b42008-09-18 21:25:13 +000040
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000041GRSimpleAPICheck *CreateAuditCFRetainRelease(ASTContext& Ctx,
42 BugReporter& BR);
43
Ted Kremenekcf118d42009-02-04 23:49:09 +000044void RegisterNSErrorChecks(BugReporter& BR, GRExprEngine &Eng);
Ted Kremenekcfdf9b42008-09-18 21:25:13 +000045
Ted Kremenek52755612008-03-27 17:17:22 +000046} // end clang namespace
47
48#endif