Cppcheck
|
#include <vfvalue.h>
Classes | |
struct | compareVisitor |
struct | decrement |
struct | equalVisitor |
struct | increment |
Public Types | |
enum class | Bound { Upper , Lower , Point } |
enum class | ValueType { INT , TOK , FLOAT , MOVED , UNINIT , CONTAINER_SIZE , LIFETIME , BUFFER_SIZE , ITERATOR_START , ITERATOR_END , SYMBOLIC } |
enum class | MoveKind { NonMovedVariable , MovedVariable , ForwardedVariable } |
kind of moved More... | |
enum class | LifetimeKind { Object , SubObject , Lambda , Iterator , Address } |
enum class | LifetimeScope { Local , Argument , SubFunction , ThisPointer , ThisValue } |
enum class | ValueKind { Possible , Known , Inconclusive , Impossible } |
How known is this value. More... | |
using | ErrorPathItem = std::pair< const Token *, std::string > |
using | ErrorPath = std::list< ErrorPathItem > |
Public Member Functions | |
Value (long long val=0, Bound b=Bound::Point) | |
Value (const Token *c, long long val, Bound b=Bound::Point) | |
bool | equalValue (const ValueFlow::Value &rhs) const |
template<class Compare > | |
bool | compareValue (const Value &rhs, Compare compare) const |
bool | operator== (const Value &rhs) const |
bool | operator!= (const Value &rhs) const |
template<class T , REQUIRES("T must be an arithmetic type", std::is_arithmetic< T >) > | |
bool | equalTo (const T &x) const |
void | decreaseRange () |
void | invertBound () |
void | invertRange () |
void | assumeCondition (const Token *tok) |
std::string | infoString () const |
std::string | toString () const |
bool | isIntValue () const |
bool | isTokValue () const |
bool | isFloatValue () const |
bool | isMovedValue () const |
bool | isUninitValue () const |
bool | isContainerSizeValue () const |
bool | isLifetimeValue () const |
bool | isBufferSizeValue () const |
bool | isIteratorValue () const |
bool | isIteratorStartValue () const |
bool | isIteratorEndValue () const |
bool | isSymbolicValue () const |
bool | isLocalLifetimeValue () const |
bool | isArgumentLifetimeValue () const |
bool | isSubFunctionLifetimeValue () const |
bool | isNonValue () const |
void | setKnown () |
bool | isKnown () const |
void | setPossible () |
bool | isPossible () const |
bool | isImpossible () const |
void | setImpossible () |
void | setInconclusive (bool inconclusive=true) |
bool | isInconclusive () const |
void | changeKnownToPossible () |
bool | errorSeverity () const |
Static Public Member Functions | |
static Value | unknown () |
template<class T , class F > | |
static void | visitValue (T &self, F f) |
static const char * | toString (MoveKind moveKind) |
static const char * | toString (LifetimeKind lifetimeKind) |
static const char * | toString (LifetimeScope lifetimeScope) |
static const char * | toString (Bound bound) |
static bool | sameToken (const Token *tok1, const Token *tok2) |
Public Attributes | |
enum ValueFlow::Value::ValueType | valueType = ValueType::INT |
Bound | bound = Bound::Point |
The value bound More... | |
long long | intvalue {} |
int value (or sometimes bool value?) More... | |
const Token * | tokvalue {} |
token value - the token that has the value. More... | |
double | floatValue {} |
float value More... | |
long long | varvalue {} |
For calculated values - variable value that calculated value depends on. More... | |
const Token * | condition {} |
Condition that this value depends on. More... | |
ErrorPath | errorPath |
ErrorPath | debugPath |
nonneg int | varId {} |
For calculated values - varId that calculated value depends on. More... | |
bool | safe {} |
value relies on safe checking More... | |
bool | conditional {} |
Conditional value. More... | |
bool | macro {} |
Value is is from an expanded macro. More... | |
bool | defaultArg {} |
Is this value passed as default parameter to the function? More... | |
int | indirect {} |
enum ValueFlow::Value::MoveKind | moveKind = MoveKind::NonMovedVariable |
MathLib::bigint | path {} |
Path id. More... | |
long long | wideintvalue {} |
int value before implicit truncation More... | |
std::vector< std::string > | subexpressions |
const Token * | capturetok {} |
enum ValueFlow::Value::LifetimeKind | lifetimeKind = LifetimeKind::Object |
enum ValueFlow::Value::LifetimeScope | lifetimeScope = LifetimeScope::Local |
enum ValueFlow::Value::ValueKind | valueKind = ValueKind::Possible |
using ValueFlow::Value::ErrorPath = std::list<ErrorPathItem> |
using ValueFlow::Value::ErrorPathItem = std::pair<const Token *, std::string> |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
inlineexplicit |
ValueFlow::Value::Value | ( | const Token * | c, |
long long | val, | ||
Bound | b = Bound::Point |
||
) |
Definition at line 28 of file vfvalue.cpp.
References errorPath, and Token::expressionString().
void ValueFlow::Value::assumeCondition | ( | const Token * | tok | ) |
Definition at line 36 of file vfvalue.cpp.
References condition, errorPath, and Token::expressionString().
Referenced by setConditionalValue().
|
inline |
Definition at line 382 of file vfvalue.h.
Referenced by changeKnownToPossible(), SingleValueFlowAnalyzer::lowerToPossible(), setTokenValue(), and valueFlowFunctionDefaultParameter().
|
inline |
Definition at line 139 of file vfvalue.h.
References isSymbolicValue(), tokvalue, and valueType.
|
inline |
Definition at line 167 of file vfvalue.h.
Referenced by ValueFlowAnalyzer::isModified().
|
inline |
Definition at line 60 of file vfvalue.h.
References ValueType::FLOAT, floatValue, ValueType::INT, intvalue, moveKind, tokvalue, and valueType.
Referenced by isDifferentKnownValues(), isEqualKnownValue(), ValueFlowAnalyzer::isSameSymbolicValue(), and ValueFlowAnalyzer::isWritable().
|
inline |
Definition at line 387 of file vfvalue.h.
Referenced by CheckBufferOverrun::arrayIndexError(), CheckType::floatToIntegerOverflowError(), CheckType::integerOverflowError(), CheckFunctions::invalidFunctionArgError(), CheckBufferOverrun::negativeIndexError(), CheckStl::negativeIndexError(), CheckStl::outOfBoundsError(), CheckType::tooBigBitwiseShiftError(), CheckType::tooBigSignedBitwiseShiftError(), and CheckOther::zerodivError().
std::string ValueFlow::Value::infoString | ( | ) | const |
Definition at line 96 of file vfvalue.cpp.
References BUFFER_SIZE, CONTAINER_SIZE, Token::expressionString(), FLOAT, floatValue, INT, intvalue, ITERATOR_END, ITERATOR_START, LIFETIME, MOVED, Token::str(), SYMBOLIC, TOK, tokvalue, MathLib::toString(), UNINIT, and valueType.
Referenced by valueFlowForwardAssign(), valueFlowSubFunction(), and ValueFlowAnalyzer::writeValue().
|
inline |
Definition at line 187 of file vfvalue.h.
Referenced by ValueFlow::asImpossible(), and valueFlowForwardAssign().
|
inline |
|
inline |
Definition at line 232 of file vfvalue.h.
Referenced by getBufferSizeValue().
|
inline |
Definition at line 226 of file vfvalue.h.
Referenced by ProgramMemory::getContainerEmptyValue(), ProgramMemory::getContainerSizeValue(), getContainerValues(), insertNegateKnown(), makeAnalyzer(), makeReverseAnalyzer(), and setTokenValue().
|
inline |
Definition at line 217 of file vfvalue.h.
References ValueType::FLOAT.
Referenced by asFloat(), castValue(), createBuiltinLibraryFunctions(), evaluate(), isComputableValue(), isNumeric(), isNumericValue(), ValueFlowAnalyzer::isWritable(), truncateImplicitConversion(), and truncateValues().
|
inline |
Definition at line 365 of file vfvalue.h.
Referenced by Token::addValue(), ConditionHandler::afterCondition(), CheckCondition::alwaysTrueFalseError(), CheckStl::checkDereferenceInvalidIterator2(), ValueFlow::combineValueProperties(), evaluate(), execute(), ProgramMemory::getContainerEmptyValue(), isCompatibleValues(), isComputableValue(), SingleValueFlowAnalyzer::isConditional(), isFalse(), ValueFlowAnalyzer::isModified(), ValueFlowAnalyzer::isSameSymbolicValue(), isTrue(), ValueFlowAnalyzer::isWritable(), SingleValueFlowAnalyzer::lowerToInconclusive(), SingleValueFlowAnalyzer::lowerToPossible(), removeImpossible(), setFunctionReturnValue(), setTokenValue(), setTokenValueCast(), SingleValueFlowAnalyzer::stopOnCondition(), toString(), truncateValues(), SingleValueFlowAnalyzer::updateScope(), MultiValueFlowAnalyzer::updateScope(), valueFlowForwardAssign(), valueFlowForwardConst(), valueFlowIteratorInfer(), and valueFlowLibraryFunction().
|
inline |
Definition at line 378 of file vfvalue.h.
Referenced by Token::addValue(), CheckNullPointer::arithmetic(), CheckBufferOverrun::arrayIndexError(), CheckOther::checkAccessOfMovedVariable(), CheckStl::checkDereferenceInvalidIterator2(), ValueFlow::combineValueProperties(), CheckStl::dereferenceInvalidIteratorError(), CheckAutoVariables::errorDanglingTemporaryLifetime(), CheckAutoVariables::errorDanglngLifetime(), CheckAutoVariables::errorInvalidLifetime(), CheckAutoVariables::errorReturnDanglingLifetime(), CheckType::floatToIntegerOverflowError(), CTU::getFileInfo(), Token::getInvalidValue(), CheckType::integerOverflowError(), CheckStl::invalidContainerError(), CheckFunctions::invalidFunctionArgError(), Settings::isEnabled(), CheckBufferOverrun::negativeIndexError(), CheckStl::negativeIndexError(), CheckNullPointer::nullPointerByDeRefAndChec(), CheckNullPointer::nullPointerError(), CheckStl::outOfBoundsError(), CheckBufferOverrun::pointerArithmeticError(), CheckType::signConversionError(), CheckType::tooBigBitwiseShiftError(), CheckType::tooBigSignedBitwiseShiftError(), CheckUninitVar::uninitvarError(), and CheckOther::zerodivError().
|
inline |
Definition at line 211 of file vfvalue.h.
References ValueType::INT.
Referenced by Token::addValue(), ConditionHandler::beforeCondition(), createBuiltinLibraryFunctions(), evalAssignment(), evaluate(), execute(), ProgramMemory::getIntValue(), insertNegateKnown(), CheckFunctions::invalidFunctionArgError(), isCompatibleValues(), isComputableValue(), isIntegralValue(), isNonConditionalPossibleIntValue(), isNumeric(), isNumericValue(), ValueFlowAnalyzer::isSameSymbolicValue(), ValueFlowAnalyzer::isWritable(), IntegralInferModel::match(), programMemoryParseCondition(), setConditionalValue(), setTokenValue(), setTokenValueCast(), ValueFlow::solveExprValue(), truncateImplicitConversion(), truncateValues(), valueFlowForwardAssign(), valueFlowForwardConst(), and valueFlowSmartPointer().
|
inline |
Definition at line 241 of file vfvalue.h.
Referenced by CheckStl::checkDereferenceInvalidIterator2(), indexValueString(), and valueFlowIteratorInfer().
|
inline |
Definition at line 238 of file vfvalue.h.
Referenced by CheckStl::checkDereferenceInvalidIterator2(), indexValueString(), and valueFlowIteratorInfer().
|
inline |
Definition at line 235 of file vfvalue.h.
Referenced by CheckStl::checkDereferenceInvalidIterator2(), ValueFlow::combineValueProperties(), evaluate(), getIteratorValues(), isComputableValue(), isDifferentKnownValues(), isEqualKnownValue(), isIntegralValue(), and ValueFlow::solveExprValue().
|
inline |
Definition at line 353 of file vfvalue.h.
Referenced by Token::addValue(), CheckOther::checkCharVariable(), CheckOther::checkModuloOfOne(), ValueFlow::combineValueProperties(), compareKnownValue(), CheckOther::comparisonNonZeroExpressionLessThanZero(), CheckStl::dereferenceInvalidIteratorError(), getDimensionsEtc(), Token::hasKnownValue(), CheckFunctions::invalidFunctionArgError(), isCompatibleValues(), SingleValueFlowAnalyzer::isConditional(), ValueFlow::isOutOfBounds(), isOutOfBoundsImpl(), ValueFlowAnalyzer::isSameSymbolicValue(), CheckStl::mismatchingContainerIterator(), CheckStl::negativeIndexError(), CheckBufferOverrun::negativeMemoryAllocationSizeError(), CheckNullPointer::nullPointerError(), SingleValueFlowAnalyzer::stopOnCondition(), CheckOther::testIfNonZeroExpressionIsPositive(), CheckUninitVar::uninitvarError(), SingleValueFlowAnalyzer::updateScope(), MultiValueFlowAnalyzer::updateScope(), valueFlowAfterAssign(), valueFlowSameExpressions(), and valueFlowSymbolicOperators().
|
inline |
Definition at line 229 of file vfvalue.h.
Referenced by Token::addValue(), CheckStl::checkDereferenceInvalidIterator2(), SingleValueFlowAnalyzer::isAlias(), ValueFlowAnalyzer::isModified(), isNotLifetimeValue(), isSameLifetime(), ValueFlowAnalyzer::isWritable(), setTokenValue(), SingleValueFlowAnalyzer::updateScope(), MultiValueFlowAnalyzer::updateScope(), SingleValueFlowAnalyzer::useSymbolicValues(), valueFlowForwardAssign(), valueFlowLifetime(), valueFlowLifetimeFunction(), valueFlowSubFunction(), and ValueFlowAnalyzer::writeValue().
|
inline |
Definition at line 248 of file vfvalue.h.
Referenced by CheckOther::checkComparePointers(), and valueFlowSubFunction().
|
inline |
Definition at line 220 of file vfvalue.h.
Referenced by ValueFlowAnalyzer::isModified().
|
inline |
Definition at line 260 of file vfvalue.h.
Referenced by removeOverlaps(), and SingleValueFlowAnalyzer::stopOnCondition().
|
inline |
Definition at line 361 of file vfvalue.h.
Referenced by ConditionHandler::afterCondition(), changePossibleToKnown(), CheckStl::eraseIteratorOutOfBoundsError(), isNonConditionalPossibleIntValue(), CheckStl::outOfBoundsError(), and valueFlowFunctionDefaultParameter().
|
inline |
Definition at line 256 of file vfvalue.h.
Referenced by valueFlowSubFunction().
|
inline |
Definition at line 244 of file vfvalue.h.
Referenced by ValueFlow::combineValueProperties(), compareValue(), evaluate(), ExpressionAnalyzer::ExpressionAnalyzer(), indexValueString(), ExpressionAnalyzer::isAliasModified(), isCompatibleValues(), isIntegralValue(), ValueFlowAnalyzer::isSameSymbolicValue(), ValueFlowAnalyzer::isWritable(), SymbolicInferModel::match(), sameValueType(), ValueFlow::solveExprValue(), SingleValueFlowAnalyzer::stopOnCondition(), valueFlowAfterAssign(), valueFlowForwardAssign(), and valueFlowSymbolicOperators().
|
inline |
Definition at line 214 of file vfvalue.h.
Referenced by Token::addValue(), createBuiltinLibraryFunctions(), findFormat(), ProgramMemory::getTokValue(), isAutoVarArray(), isComputableValue(), setTokenValue(), valueFlowArrayBool(), valueFlowDynamicBufferSize(), and valueFlowForwardAssign().
|
inline |
Definition at line 223 of file vfvalue.h.
Referenced by isFalse(), isTrue(), setTokenValue(), SingleValueFlowAnalyzer::useSymbolicValues(), valueFlowAfterAssign(), valueFlowLibraryFunction(), and CheckUninitVar::valueFlowUninit().
|
inline |
|
inline |
Definition at line 149 of file vfvalue.h.
References condition, conditional, defaultArg, indirect, valueKind, varId, and varvalue.
Definition at line 158 of file vfvalue.cpp.
References Token::exprId().
Referenced by mergeAdjacent(), and removeContradiction().
|
inline |
Definition at line 369 of file vfvalue.h.
Referenced by ValueFlow::asImpossible(), ValueFlow::combineValueProperties(), evaluate(), infer(), ValueFlowAnalyzer::isSameSymbolicValue(), makeConditionValue(), ProgramMemory::setIntValue(), valueFlowContainerSize(), valueFlowForwardAssign(), valueFlowImpossibleValues(), and valueFlowSymbolicOperators().
|
inline |
Definition at line 373 of file vfvalue.h.
References inconclusive.
Referenced by LifetimeStore::byRef(), LifetimeStore::byVal(), ValueFlow::combineValueProperties(), SingleValueFlowAnalyzer::lowerToInconclusive(), setValueKind(), valueFlowArrayElement(), valueFlowForwardConst(), and valueFlowLifetime().
|
inline |
Definition at line 349 of file vfvalue.h.
Referenced by Tokenizer::arraySizeAfterValueFlow(), changePossibleToKnown(), ValueFlow::combineValueProperties(), CheckBufferOverrun::getBufferSize(), insertNegateKnown(), makeConditionValue(), makeContainerSizeValue(), makeSymbolic(), CheckNullPointer::nullPointerError(), setFunctionReturnValue(), setTokenValue(), setValueKind(), setValues(), valueFlowAfterMove(), valueFlowArray(), valueFlowArrayBool(), valueFlowContainerSetTokValue(), valueFlowContainerSize(), valueFlowDynamicBufferSize(), valueFlowIterators(), valueFlowNumber(), valueFlowRightShift(), valueFlowSameExpressions(), valueFlowSetConstantValue(), valueFlowSmartPointer(), valueFlowString(), valueFlowSymbolicOperators(), valueFlowUninit(), SymbolicInferModel::yield(), IntegralInferModel::yield(), and IteratorInferModel::yield().
|
inline |
Definition at line 357 of file vfvalue.h.
Referenced by ValueFlow::combineValueProperties(), evaluate(), setConditionalValue(), setFunctionReturnValue(), setTokenValue(), setValueKind(), and valueFlowIteratorInfer().
std::string ValueFlow::Value::toString | ( | ) | const |
Definition at line 41 of file vfvalue.cpp.
References bound, BUFFER_SIZE, CONTAINER_SIZE, Token::expressionString(), FLOAT, floatValue, indirect, INT, intvalue, isImpossible(), ITERATOR_END, ITERATOR_START, LIFETIME, lifetimeKind, Lower, MOVED, moveKind, path, Token::str(), SYMBOLIC, TOK, tokvalue, UNINIT, Upper, and valueType.
Referenced by debugString(), Token::printValueFlow(), and setFunctionReturnValue().
|
static |
|
static |
Definition at line 142 of file vfvalue.cpp.
References Address, Iterator, Lambda, lifetimeKind, Object, and SubObject.
|
static |
Definition at line 168 of file vfvalue.cpp.
References Argument, lifetimeScope, Local, SubFunction, ThisPointer, and ThisValue.
|
static |
Definition at line 130 of file vfvalue.cpp.
References ForwardedVariable, MovedVariable, moveKind, and NonMovedVariable.
|
inlinestatic |
Definition at line 54 of file vfvalue.h.
References valueType.
Referenced by CheckBufferOverrun::arrayIndex(), createBuiltinLibraryFunctions(), evaluate(), evaluateLibraryFunction(), and getOverrunIndexValues().
|
inlinestatic |
Definition at line 101 of file vfvalue.h.
References ValueType::FLOAT, and ValueType::INT.
Bound ValueFlow::Value::bound = Bound::Point |
The value bound
Definition at line 265 of file vfvalue.h.
Referenced by changePossibleToKnown(), ValueFlow::combineValueProperties(), evaluate(), indexValueString(), infer(), isAdjacent(), isOutOfBoundsImpl(), ValueFlowAnalyzer::isSameSymbolicValue(), removeOverlaps(), setTokenValue(), setValueUpperBound(), toString(), truncateValues(), valueFlowContainerSize(), valueFlowForwardAssign(), valueFlowForwardConst(), valueFlowImpossibleValues(), valueFlowIteratorInfer(), and valueFlowSymbolicOperators().
const Token* ValueFlow::Value::capturetok {} |
Definition at line 315 of file vfvalue.h.
Referenced by LifetimeStore::byVal().
const Token* ValueFlow::Value::condition {} |
Condition that this value depends on.
Definition at line 280 of file vfvalue.h.
Referenced by addToErrorPath(), CheckNullPointer::arithmetic(), CheckBufferOverrun::arrayIndexError(), assumeCondition(), ValueFlow::combineValueProperties(), CheckStl::dereferenceInvalidIteratorError(), CheckStl::eraseIteratorOutOfBoundsError(), Check::getErrorPath(), Token::getInvalidValue(), Check::getMessageId(), getProgramMemory(), CheckType::integerOverflowError(), CheckFunctions::invalidFunctionArgError(), SingleValueFlowAnalyzer::isConditional(), Settings::isEnabled(), isNonConditionalPossibleIntValue(), makeConditionValue(), CheckStl::negativeIndexError(), CheckNullPointer::nullPointerError(), operator==(), CheckStl::outOfBoundsError(), CheckBufferOverrun::pointerArithmeticError(), CheckType::tooBigBitwiseShiftError(), CheckType::tooBigSignedBitwiseShiftError(), valueFlowArrayElement(), valueFlowIteratorInfer(), and CheckOther::zerodivError().
bool ValueFlow::Value::conditional {} |
Conditional value.
Definition at line 293 of file vfvalue.h.
Referenced by SingleValueFlowAnalyzer::isConditional(), isNonConditionalPossibleIntValue(), SingleValueFlowAnalyzer::makeConditional(), operator==(), and setTokenValue().
ErrorPath ValueFlow::Value::debugPath |
Definition at line 284 of file vfvalue.h.
Referenced by addToErrorPath(), and setSourceLocation().
bool ValueFlow::Value::defaultArg {} |
Is this value passed as default parameter to the function?
Definition at line 299 of file vfvalue.h.
Referenced by Settings::isEnabled(), CheckNullPointer::nullPointerError(), operator==(), and valueFlowFunctionDefaultParameter().
ErrorPath ValueFlow::Value::errorPath |
Definition at line 282 of file vfvalue.h.
Referenced by SingleValueFlowAnalyzer::addErrorPath(), addToErrorPath(), CheckBufferOverrun::arrayIndexError(), assumeCondition(), LifetimeStore::byRef(), LifetimeStore::byVal(), ValueFlow::combineValueProperties(), CheckOther::comparePointersError(), CheckAutoVariables::errorDanglingTemporaryLifetime(), CheckAutoVariables::errorDanglngLifetime(), CheckAutoVariables::errorInvalidLifetime(), CheckAutoVariables::errorReturnDanglingLifetime(), getDimensionsEtc(), Check::getErrorPath(), CheckStl::invalidContainerError(), ValueFlowAnalyzer::isSameSymbolicValue(), makeConditionValue(), CheckBufferOverrun::negativeIndexError(), CheckBufferOverrun::objectIndexError(), SingleValueFlowAnalyzer::reanalyze(), setFunctionReturnValue(), CheckUninitVar::uninitvarError(), Value(), valueFlowAfterAssign(), valueFlowAfterMove(), valueFlowArrayElement(), valueFlowDynamicBufferSize(), valueFlowForLoopSimplifyAfter(), valueFlowForwardAssign(), valueFlowForwardConst(), valueFlowLifetime(), valueFlowLifetimeFunction(), valueFlowSameExpressions(), valueFlowSubFunction(), valueFlowSymbolic(), valueFlowSymbolicOperators(), and ValueFlowAnalyzer::writeValue().
double ValueFlow::Value::floatValue {} |
float value
Definition at line 274 of file vfvalue.h.
Referenced by asFloat(), castValue(), createBuiltinLibraryFunctions(), equalValue(), evaluate(), CheckType::floatToIntegerOverflowError(), CheckType::getErrorMessages(), infoString(), CheckFunctions::invalidFunctionArgError(), setTokenValueCast(), toString(), truncateValues(), and valueFlowSetConstantValue().
int ValueFlow::Value::indirect {} |
Definition at line 301 of file vfvalue.h.
Referenced by changeKnownToPossible(), changePossibleToKnown(), ValueFlowAnalyzer::getIndirect(), operator==(), removeImpossible(), setTokenValue(), ExpressionAnalyzer::setupExprVarIds(), toString(), and valueFlowUninit().
long long ValueFlow::Value::intvalue {} |
int value (or sometimes bool value?)
Definition at line 268 of file vfvalue.h.
Referenced by CheckCondition::alwaysTrueFalseError(), CheckNullPointer::arithmetic(), asFloat(), ConditionHandler::beforeCondition(), CheckBufferOverrun::bufferOverflow(), castValue(), CheckOther::checkCharVariable(), CheckBool::checkComparisonOfBoolExpressionWithInt(), CheckStl::checkDereferenceInvalidIterator2(), CheckType::checkIntegerOverflow(), CheckType::checkLongCast(), createBuiltinLibraryFunctions(), equalValue(), evalAssignment(), evaluate(), ValueFlowAnalyzer::evaluate(), execute(), extractForLoopValues(), CheckBufferOverrun::getBufferSize(), getCompareValue(), ProgramMemory::getContainerEmptyValue(), ProgramMemory::getContainerSizeValue(), getDimensionsEtc(), ProgramMemory::getIntValue(), indexValueString(), infoString(), insertNegateKnown(), CheckFunctions::invalidFunctionArgError(), isAdjacent(), isFalse(), isOppositeCond(), ValueFlow::isOutOfBounds(), isOutOfBoundsImpl(), isSameExpression(), ValueFlowAnalyzer::isSameSymbolicValue(), isTrue(), CheckOther::knownArgumentError(), CheckOther::knownPointerToBoolError(), makeConditionValue(), makeSymbolic(), CheckStl::negativeIndexError(), CheckStl::outOfBoundsError(), CheckBufferOverrun::pointerArithmeticError(), programMemoryParseCondition(), setConditionalValue(), setTokenValue(), setTokenValueCast(), ValueFlow::solveExprValue(), CheckBufferOverrun::stringNotZeroTerminated(), CheckType::tooBigBitwiseShiftError(), CheckType::tooBigSignedBitwiseShiftError(), toString(), truncateImplicitConversion(), truncateValues(), valueFlowAfterAssign(), valueFlowArrayElement(), valueFlowForwardAssign(), valueFlowForwardConst(), valueFlowImpossibleValues(), valueFlowIteratorInfer(), valueFlowSymbolicOperators(), ContainerExpressionAnalyzer::writeValue(), and ValueFlowAnalyzer::writeValue().
enum ValueFlow::Value::LifetimeKind ValueFlow::Value::lifetimeKind = LifetimeKind::Object |
enum ValueFlow::Value::LifetimeScope ValueFlow::Value::lifetimeScope = LifetimeScope::Local |
Referenced by LifetimeStore::byRef(), LifetimeStore::byVal(), toString(), valueFlowLifetime(), and valueFlowSubFunction().
bool ValueFlow::Value::macro {} |
enum ValueFlow::Value::MoveKind ValueFlow::Value::moveKind = MoveKind::NonMovedVariable |
MathLib::bigint ValueFlow::Value::path {} |
Path id.
Definition at line 307 of file vfvalue.h.
Referenced by LifetimeStore::byVal(), CheckStl::checkDereferenceInvalidIterator2(), ValueFlow::combineValueProperties(), getDimensionsEtc(), isOutOfBoundsImpl(), makeSizeValue(), setTokenValue(), toString(), and valueFlowSubFunction().
bool ValueFlow::Value::safe {} |
value relies on safe checking
Definition at line 290 of file vfvalue.h.
Referenced by ValueFlow::combineValueProperties(), Check::getMessageId(), and CheckType::integerOverflowError().
std::vector<std::string> ValueFlow::Value::subexpressions |
Definition at line 312 of file vfvalue.h.
Referenced by setTokenValue(), CheckUninitVar::uninitvarError(), and valueFlowUninit().
const Token* ValueFlow::Value::tokvalue {} |
token value - the token that has the value.
this is used for pointer aliases, strings, etc.
Definition at line 271 of file vfvalue.h.
Referenced by Token::addValue(), LifetimeStore::byRef(), LifetimeStore::byVal(), CheckOther::checkComparePointers(), CheckStl::checkDereferenceInvalidIterator2(), CheckStl::checkIteratorPair(), ValueFlow::combineValueProperties(), CheckOther::comparePointersError(), compareValue(), createBuiltinLibraryFunctions(), equalValue(), CheckAutoVariables::errorInvalidDeallocation(), evaluate(), ExpressionAnalyzer::ExpressionAnalyzer(), getProgramMemory(), ProgramMemory::getTokValue(), infoString(), CheckStl::invalidContainer(), ExpressionAnalyzer::isAliasModified(), isAutoVarArray(), isCompatibleValues(), isComputableValue(), isIteratorPair(), isSameLifetime(), ValueFlowAnalyzer::isSameSymbolicValue(), ValueFlow::lifetimeMessage(), SymbolicInferModel::match(), CheckStl::mismatchingContainerIterator(), CheckBufferOverrun::objectIndexError(), sameValueType(), setSymbolic(), toString(), valueFlowAfterAssign(), valueFlowArray(), valueFlowContainerSetTokValue(), valueFlowContainerSize(), valueFlowDynamicBufferSize(), valueFlowForwardAssign(), valueFlowForwardLifetime(), valueFlowLifetime(), valueFlowPointerAlias(), valueFlowString(), valueFlowSymbolicOperators(), valueFlowUninit(), and SymbolicInferModel::yield().
enum ValueFlow::Value::ValueKind ValueFlow::Value::valueKind = ValueKind::Possible |
enum ValueFlow::Value::ValueType ValueFlow::Value::valueType = ValueType::INT |
Referenced by Token::addValue(), LifetimeStore::byRef(), LifetimeStore::byVal(), castValue(), ValueFlow::combineValueProperties(), compareValue(), createBuiltinLibraryFunctions(), equalValue(), evaluate(), CheckBufferOverrun::getBufferSize(), CheckType::getErrorMessages(), CTU::getFileInfo(), infoString(), isAdjacent(), isCompatibleValues(), makeContainerSizeValue(), IteratorInferModel::match(), ContainerConditionHandler::parse(), removeOverlaps(), sameValueType(), ProgramMemory::setContainerSizeValue(), setSymbolic(), setTokenValue(), setTokenValueCast(), toString(), truncateValues(), unknown(), valueFlowAfterAssign(), valueFlowAfterMove(), valueFlowArray(), valueFlowContainerSetTokValue(), valueFlowContainerSize(), valueFlowDynamicBufferSize(), valueFlowImpossibleValues(), valueFlowInferCondition(), valueFlowIterators(), valueFlowLifetime(), valueFlowPointerAlias(), valueFlowSetConstantValue(), valueFlowString(), valueFlowSymbolicOperators(), valueFlowUninit(), SymbolicInferModel::yield(), IntegralInferModel::yield(), and IteratorInferModel::yield().
nonneg int ValueFlow::Value::varId {} |
For calculated values - varId that calculated value depends on.
Definition at line 287 of file vfvalue.h.
Referenced by Token::addValue(), ValueFlow::combineValueProperties(), isCompatibleValues(), operator==(), valueFlowArrayElement(), and valueFlowForLoopSimplify().
long long ValueFlow::Value::varvalue {} |
For calculated values - variable value that calculated value depends on.
Definition at line 277 of file vfvalue.h.
Referenced by ValueFlow::combineValueProperties(), isCompatibleValues(), operator==(), and valueFlowArrayElement().
long long ValueFlow::Value::wideintvalue {} |
int value before implicit truncation
Definition at line 310 of file vfvalue.h.
Referenced by truncateImplicitConversion().