blob: 1271ae4ab1c044c2c0ee4fa36e4b748dcaa93869 [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 {
Mike Stump1eb44332009-09-09 15:08:12 +000028
Ted Kremenek52755612008-03-27 17:17:22 +000029class GRSimpleAPICheck;
30class ASTContext;
Mike Stump1eb44332009-09-09 15:08:12 +000031class GRStateManager;
Ted Kremenekcf118d42009-02-04 23:49:09 +000032class BugReporter;
33class GRExprEngine;
Mike Stump1eb44332009-09-09 15:08:12 +000034
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000035GRSimpleAPICheck *CreateBasicObjCFoundationChecks(ASTContext& Ctx,
Ted Kremenekcf118d42009-02-04 23:49:09 +000036 BugReporter& BR);
Mike Stump1eb44332009-09-09 15:08:12 +000037
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000038GRSimpleAPICheck *CreateAuditCFNumberCreate(ASTContext& Ctx,
Ted Kremenekcf118d42009-02-04 23:49:09 +000039 BugReporter& BR);
Mike Stump1eb44332009-09-09 15:08:12 +000040
Ted Kremenek79b4f7d2009-07-14 00:43:42 +000041GRSimpleAPICheck *CreateAuditCFRetainRelease(ASTContext& Ctx,
42 BugReporter& BR);
Mike Stump1eb44332009-09-09 15:08:12 +000043
Zhongxing Xu5ab128b2009-08-21 02:18:44 +000044void RegisterNSErrorChecks(BugReporter& BR, GRExprEngine &Eng, const Decl &D);
Mike Stump1eb44332009-09-09 15:08:12 +000045
Ted Kremenek52755612008-03-27 17:17:22 +000046} // end clang namespace
47
48#endif