12#include "llvm/ADT/DenseSet.h"
26 if (CheckDecls.empty()) {
31 ParentClass->
getName() !=
"CheckError")
37 if (N ==
nullptr || !N->getDeclName().isIdentifier() ||
38 N->getName() !=
"logging")
42 if (N->getParent() ==
nullptr || !N->getParent()->isTranslationUnit())
46 if (M->getDeclName().isIdentifier() && M->getName().ends_with(
"Check"))
50 return CheckDecls.contains(&
D);
54 auto CS = Element.getAs<
CFGStmt>();
57 auto Stmt = CS->getStmt();
58 if (
const auto *
Call = dyn_cast<CallExpr>(
Stmt)) {
60 dyn_cast_or_null<CXXMethodDecl>(
Call->getDirectCallee())) {
63 Env.assume(
Env.arena().makeLiteral(
false));
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Represents a top-level expression in a basic block.
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
method_range methods() const
DeclContext * getDeclContext()
bool isIdentifier() const
Predicate functions for querying what type of name this is.
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Stmt - This represents one statement.
bool transfer(const CFGElement &Element, Environment &Env) override
Return value indicates whether the model processed the Element.
Holds the state of the program (store and heap) at a given program point.
bool isCheckLikeMethod(llvm::SmallDenseSet< const CXXMethodDecl * > &CheckDecls, const CXXMethodDecl &D)
Determines whether D is one of the methods used to implement Chromium's CHECK macros.
The JSON file list parser is used to communicate input to InstallAPI.