1 //== CheckerHelpers.h - Helper functions for checkers ------------*- C++ -*--=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines CheckerVisitor.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CHECKERHELPERS_H
15 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CHECKERHELPERS_H
17 #include "clang/AST/Stmt.h"
23 bool containsMacro(const Stmt *S);
24 bool containsEnum(const Stmt *S);
25 bool containsStaticLocal(const Stmt *S);
26 bool containsBuiltinOffsetOf(const Stmt *S);
27 template <class T> bool containsStmt(const Stmt *S) {
31 for (Stmt::const_child_range I = S->children(); I; ++I)
32 if (const Stmt *child = *I)
33 if (containsStmt<T>(child))
41 } // end clang namespace