clang  6.0.0svn
Classes | Namespaces | Macros
CheckerContext.h File Reference
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h"
Include dependency graph for CheckerContext.h:

Go to the source code of this file.

Classes

class  clang::ento::CheckerContext
 

Namespaces

 clang
 /file This file defines classes for searching and anlyzing source code clones.
 
 clang::ento
 

Macros

#define REGISTER_MAP_WITH_PROGRAMSTATE(Name, Key, Value)
 Declares an immutable map of type NameTy, suitable for placement into the ProgramState. More...
 
#define REGISTER_SET_WITH_PROGRAMSTATE(Name, Elem)   REGISTER_TRAIT_WITH_PROGRAMSTATE(Name, llvm::ImmutableSet<Elem>)
 Declares an immutable set of type NameTy, suitable for placement into the ProgramState. More...
 
#define REGISTER_LIST_WITH_PROGRAMSTATE(Name, Elem)   REGISTER_TRAIT_WITH_PROGRAMSTATE(Name, llvm::ImmutableList<Elem>)
 Declares an immutable list of type NameTy, suitable for placement into the ProgramState. More...
 

Macro Definition Documentation

◆ REGISTER_LIST_WITH_PROGRAMSTATE

#define REGISTER_LIST_WITH_PROGRAMSTATE (   Name,
  Elem 
)    REGISTER_TRAIT_WITH_PROGRAMSTATE(Name, llvm::ImmutableList<Elem>)

Declares an immutable list of type NameTy, suitable for placement into the ProgramState.

This is implementing using llvm::ImmutableList.

State = State->add<Name>(E); // Adds to the /end/ of the list.
bool Present = State->contains<Name>(E);
NameTy List = State->get<Name>();

The macro should not be used inside namespaces, or for traits that must be accessible from more than one translation unit.

Definition at line 66 of file CheckerContext.h.

◆ REGISTER_MAP_WITH_PROGRAMSTATE

#define REGISTER_MAP_WITH_PROGRAMSTATE (   Name,
  Key,
  Value 
)
Value:
#define REGISTER_TRAIT_WITH_PROGRAMSTATE(Name, Type)
Declares a program state trait for type Type called Name, and introduce a typedef named NameTy...
#define CLANG_ENTO_PROGRAMSTATE_MAP(Key, Value)
Helper for registering a map trait.

Declares an immutable map of type NameTy, suitable for placement into the ProgramState.

This is implementing using llvm::ImmutableMap.

State = State->set<Name>(K, V);
const Value *V = State->get<Name>(K); // Returns NULL if not in the map.
State = State->remove<Name>(K);
NameTy Map = State->get<Name>();

The macro should not be used inside namespaces, or for traits that must be accessible from more than one translation unit.

Definition at line 36 of file CheckerContext.h.

◆ REGISTER_SET_WITH_PROGRAMSTATE

#define REGISTER_SET_WITH_PROGRAMSTATE (   Name,
  Elem 
)    REGISTER_TRAIT_WITH_PROGRAMSTATE(Name, llvm::ImmutableSet<Elem>)

Declares an immutable set of type NameTy, suitable for placement into the ProgramState.

This is implementing using llvm::ImmutableSet.

State = State->add<Name>(E);
State = State->remove<Name>(E);
bool Present = State->contains<Name>(E);
NameTy Set = State->get<Name>();

The macro should not be used inside namespaces, or for traits that must be accessible from more than one translation unit.

Definition at line 52 of file CheckerContext.h.