diff options
Diffstat (limited to 'include/clang/Analysis')
6 files changed, 0 insertions, 222 deletions
diff --git a/include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h b/include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h deleted file mode 100644 index 007ec093b2e0a..0000000000000 --- a/include/clang/Analysis/PathSensitive/Checkers/AttrNonNullChecker.h +++ /dev/null @@ -1,28 +0,0 @@ -//===--- AttrNonNullChecker.h - Undefined arguments checker ----*- C++ -*--===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This defines AttrNonNullChecker, a builtin check in GRExprEngine that -// performs checks for arguments declared to have nonnull attribute. -// -//===----------------------------------------------------------------------===// - -#include "clang/Analysis/PathSensitive/CheckerVisitor.h" - -namespace clang { - -class AttrNonNullChecker : public CheckerVisitor<AttrNonNullChecker> { - BugType *BT; - -public: - AttrNonNullChecker() : BT(0) {} - static void *getTag(); - void PreVisitCallExpr(CheckerContext &C, const CallExpr *CE); -}; - -} diff --git a/include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h b/include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h deleted file mode 100644 index 70f3c44165e02..0000000000000 --- a/include/clang/Analysis/PathSensitive/Checkers/BadCallChecker.h +++ /dev/null @@ -1,30 +0,0 @@ -//===--- BadCallChecker.h - Bad call checker --------------------*- C++ -*--==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This defines BadCallChecker, a builtin check in GRExprEngine that performs -// checks for bad callee at call sites. -// -//===----------------------------------------------------------------------===// - -#include "clang/Analysis/PathSensitive/CheckerVisitor.h" - -namespace clang { - -class BadCallChecker : public CheckerVisitor<BadCallChecker> { - BuiltinBug *BT; - -public: - BadCallChecker() : BT(0) {} - - static void *getTag(); - - void PreVisitCallExpr(CheckerContext &C, const CallExpr *CE); -}; - -} diff --git a/include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h b/include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h deleted file mode 100644 index 317e43a0e62ef..0000000000000 --- a/include/clang/Analysis/PathSensitive/Checkers/DivZeroChecker.h +++ /dev/null @@ -1,28 +0,0 @@ -//== DivZeroChecker.h - Division by zero checker ----------------*- C++ -*--==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This defines DivZeroChecker, a builtin check in GRExprEngine that performs -// checks for division by zeros. -// -//===----------------------------------------------------------------------===// - -#include "clang/Analysis/PathSensitive/CheckerVisitor.h" - -namespace clang { - -class DivZeroChecker : public CheckerVisitor<DivZeroChecker> { - BuiltinBug *BT; -public: - DivZeroChecker() : BT(0) {} - - static void *getTag(); - void PreVisitBinaryOperator(CheckerContext &C, const BinaryOperator *B); -}; - -} diff --git a/include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h b/include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h deleted file mode 100644 index 7f4e7d524f6cd..0000000000000 --- a/include/clang/Analysis/PathSensitive/Checkers/UndefinedArgChecker.h +++ /dev/null @@ -1,34 +0,0 @@ -//===--- UndefinedArgChecker.h - Undefined arguments checker ----*- C++ -*--==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This defines BadCallChecker, a builtin check in GRExprEngine that performs -// checks for undefined arguments. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_UNDEFARGCHECKER -#define LLVM_CLANG_UNDEFARGCHECKER - -#include "clang/Analysis/PathSensitive/CheckerVisitor.h" - -namespace clang { - -class UndefinedArgChecker : public CheckerVisitor<UndefinedArgChecker> { - BugType *BT; - -public: - UndefinedArgChecker() : BT(0) {} - - static void *getTag(); - - void PreVisitCallExpr(CheckerContext &C, const CallExpr *CE); -}; - -} -#endif diff --git a/include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h b/include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h deleted file mode 100644 index b339b3d301417..0000000000000 --- a/include/clang/Analysis/PathSensitive/Checkers/VLASizeChecker.h +++ /dev/null @@ -1,39 +0,0 @@ -//=== VLASizeChecker.h - Undefined dereference checker ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This defines two VLASizeCheckers, a builtin check in GRExprEngine that -// performs checks for declaration of VLA of undefined or zero size. -// -//===----------------------------------------------------------------------===// - -#include "clang/Analysis/PathSensitive/Checker.h" - -namespace clang { - -class UndefSizedVLAChecker : public Checker { - BugType *BT; - -public: - UndefSizedVLAChecker() : BT(0) {} - static void *getTag(); - ExplodedNode *CheckType(QualType T, ExplodedNode *Pred, - const GRState *state, Stmt *S, GRExprEngine &Eng); -}; - -class ZeroSizedVLAChecker : public Checker { - BugType *BT; - -public: - ZeroSizedVLAChecker() : BT(0) {} - static void *getTag(); - ExplodedNode *CheckType(QualType T, ExplodedNode *Pred, - const GRState *state, Stmt *S, GRExprEngine &Eng); -}; - -} diff --git a/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h b/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h deleted file mode 100644 index 1bc798f4e79e1..0000000000000 --- a/include/clang/Analysis/Visitors/CFGVarDeclVisitor.h +++ /dev/null @@ -1,63 +0,0 @@ -//==- CFGVarDeclVisitor - Generic visitor of VarDecls in a CFG --*- C++ --*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the template class CFGVarDeclVisitor, which provides -// a generic way to visit all the VarDecl's in a CFG. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CLANG_ANALYSIS_CFG_VARDECL_VISITOR_H -#define LLVM_CLANG_ANALYSIS_CFG_VARDECL_VISITOR_H - -#include "clang/Analysis/Visitors/CFGStmtVisitor.h" -#include "clang/AST/Decl.h" -#include "clang/AST/Stmt.h" - -namespace clang { - -template <typename ImplClass> -class CFGVarDeclVisitor : public CFGStmtVisitor<ImplClass> { - const CFG& cfg; -public: - CFGVarDeclVisitor(const CFG& c) : cfg(c) {} - - void VisitStmt(Stmt* S) { - static_cast<ImplClass*>(this)->VisitChildren(S); - } - - void VisitDeclRefExpr(DeclRefExpr* DR) { - static_cast<ImplClass*>(this)->VisitDeclChain(DR->getDecl()); - } - - void VisitDeclStmt(DeclStmt* DS) { - static_cast<ImplClass*>(this)->VisitDeclChain(DS->getDecl()); - } - - void VisitDeclChain(ScopedDecl* D) { - for (; D != NULL ; D = D->getNextDeclarator()) - static_cast<ImplClass*>(this)->VisitScopedDecl(D); - } - - void VisitScopedDecl(ScopedDecl* D) { - if (VarDecl* V = dyn_cast<VarDecl>(D)) - static_cast<ImplClass*>(this)->VisitVarDecl(V); - } - - void VisitVarDecl(VarDecl* D) {} - - void VisitAllDecls() { - for (CFG::const_iterator BI = cfg.begin(), BE = cfg.end(); BI != BE; ++BI) - for (CFGBlock::const_iterator SI=BI->begin(),SE = BI->end();SI != SE;++SI) - static_cast<ImplClass*>(this)->BlockStmt_Visit(const_cast<Stmt*>(*SI)); - } -}; - -} // end namespace clang - -#endif |