Cppcheck
|
#include <library.h>
Classes | |
struct | Function |
struct | RangeItemRecordTypeItem |
Public Types | |
enum class | Action { RESIZE , CLEAR , PUSH , POP , FIND , FIND_CONST , INSERT , ERASE , CHANGE_CONTENT , CHANGE , CHANGE_INTERNAL , NO_ACTION } |
enum class | Yield { AT_INDEX , ITEM , BUFFER , BUFFER_NT , START_ITERATOR , END_ITERATOR , ITERATOR , SIZE , EMPTY , NO_YIELD } |
Public Member Functions | |
Container ()=default | |
Action | getAction (const std::string &function) const |
Yield | getYield (const std::string &function) const |
const std::string & | getReturnType (const std::string &function) const |
Static Public Member Functions | |
static Yield | yieldFrom (const std::string &yieldName) |
static Action | actionFrom (const std::string &actionName) |
Public Attributes | |
std::string | startPattern |
std::string | startPattern2 |
std::string | endPattern |
std::string | itEndPattern |
std::map< std::string, Function > | functions |
int | type_templateArgNo = -1 |
std::vector< RangeItemRecordTypeItem > | rangeItemRecordType |
int | size_templateArgNo = -1 |
bool | arrayLike_indexOp {} |
bool | stdStringLike {} |
bool | stdAssociativeLike {} |
bool | opLessAllowed = true |
bool | hasInitializerListConstructor {} |
bool | unstableErase {} |
bool | unstableInsert {} |
bool | view {} |
|
strong |
|
strong |
|
default |
|
static |
Definition at line 166 of file library.cpp.
References CHANGE, CHANGE_CONTENT, CHANGE_INTERNAL, CLEAR, ERASE, FIND, FIND_CONST, INSERT, NO_ACTION, POP, PUSH, and RESIZE.
Referenced by Library::load(), and Library::loadFunction().
|
inline |
Definition at line 248 of file library.h.
Referenced by astContainerAction(), containerAppendsElement(), containerPopsElement(), CheckStl::eraseIteratorOutOfBounds(), Library::getContainerFromAction(), CheckStl::if_find(), isConstFunctionCall(), isVariableChanged(), ContainerExpressionAnalyzer::isWritable(), CheckStl::mismatchingContainerIterator(), valueFlowContainerSize(), and ContainerExpressionAnalyzer::writeValue().
|
inline |
Definition at line 262 of file library.h.
References emptyString.
Referenced by Library::returnValueType().
|
inline |
Definition at line 255 of file library.h.
Referenced by astContainerYield(), CheckClass::checkConstFunc(), containerYieldsElement(), getContainerFromSize(), Library::getContainerFromYield(), getContainerIndex(), getContainerYield(), getLifetimeTokens(), CheckStl::if_find(), isConstFunctionCall(), CheckStl::isContainerSize(), isContainerSizeChangedByFunction(), isVariableChanged(), SymbolDatabase::setValueType(), CheckStl::stlOutOfBounds(), and valueFlowArrayElement().
|
static |
Definition at line 144 of file library.cpp.
References AT_INDEX, BUFFER, BUFFER_NT, EMPTY, END_ITERATOR, ITEM, ITERATOR, NO_YIELD, SIZE, and START_ITERATOR.
Referenced by Library::load(), and Library::loadFunction().
bool Library::Container::arrayLike_indexOp {} |
Definition at line 239 of file library.h.
Referenced by Variable::arrayDimensions(), getContainerIndex(), Library::load(), CheckStl::negativeIndex(), CheckStl::outOfBoundsIndexExpression(), and CheckStl::stlOutOfBounds().
std::string Library::Container::endPattern |
Definition at line 234 of file library.h.
Referenced by Library::detectContainerInternal(), and Library::load().
std::map<std::string, Function> Library::Container::functions |
Definition at line 235 of file library.h.
Referenced by SymbolDatabase::createSymbolDatabaseSetVariablePointers(), Library::load(), and SymbolDatabase::setValueTypeInTokenList().
bool Library::Container::hasInitializerListConstructor {} |
Definition at line 243 of file library.h.
Referenced by Library::load().
std::string Library::Container::itEndPattern |
Definition at line 234 of file library.h.
Referenced by Library::detectContainerInternal(), and Library::load().
bool Library::Container::opLessAllowed = true |
Definition at line 242 of file library.h.
Referenced by Library::load(), and CheckStl::stlBoundaries().
std::vector<RangeItemRecordTypeItem> Library::Container::rangeItemRecordType |
Definition at line 237 of file library.h.
Referenced by Library::load(), and SymbolDatabase::setValueType().
int Library::Container::size_templateArgNo = -1 |
Definition at line 238 of file library.h.
Referenced by Variable::arrayDimensions(), Library::load(), and valueFlowContainerSize().
std::string Library::Container::startPattern |
Definition at line 234 of file library.h.
Referenced by Library::detectContainerInternal(), Library::load(), and ValueType::str().
std::string Library::Container::startPattern2 |
Definition at line 234 of file library.h.
Referenced by Library::detectContainerInternal(), and Library::load().
bool Library::Container::stdAssociativeLike {} |
Definition at line 241 of file library.h.
Referenced by ValueFlow::isContainerSizeChanged(), isMapFind(), isVariableChanged(), Library::load(), CheckStl::outOfBounds(), and valueFlowArrayElement().
bool Library::Container::stdStringLike {} |
Definition at line 240 of file library.h.
Referenced by astIsContainerString(), astIsNonStringContainer(), CheckLeakAutoVar::functionCall(), getContainerIndex(), getContainerSizeFromConstructorArgs(), getInitListSize(), CheckStl::if_find(), Variable::isStlStringViewType(), isTemporary(), ContainerExpressionAnalyzer::isWritable(), Library::load(), ValueType::matchParameter(), CheckStl::outOfBoundsIndexExpression(), valueFlowContainerSize(), valueFlowImpossibleValues(), and ContainerExpressionAnalyzer::writeValue().
int Library::Container::type_templateArgNo = -1 |
Definition at line 236 of file library.h.
Referenced by CheckStl::if_find(), and Library::load().
bool Library::Container::unstableErase {} |
Definition at line 244 of file library.h.
Referenced by Library::load().
bool Library::Container::unstableInsert {} |
Definition at line 245 of file library.h.
Referenced by Library::load().
bool Library::Container::view {} |
Definition at line 246 of file library.h.
Referenced by astIsContainerView(), isLifetimeBorrowed(), isLifetimeOwned(), Variable::isStlStringViewType(), Library::load(), and valueFlowImpossibleValues().