clang  4.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

#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.

1 State = State->add<Name>(E); // Adds to the /end/ of the list.
2 bool Present = State->contains<Name>(E);
3 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.

#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.

1 State = State->set<Name>(K, V);
2 const Value *V = State->get<Name>(K); // Returns NULL if not in the map.
3 State = State->remove<Name>(K);
4 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.

Referenced by GetCFNumberSize(), and llvm::FoldingSetTrait< AllocKind >::Profile().

#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.

1 State = State->add<Name>(E);
2 State = State->remove<Name>(E);
3 bool Present = State->contains<Name>(E);
4 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.