Silent clang -Wshadow warning. (#812)
Add an optional extended description…
This commit is contained in:
parent
4eef5642c9
commit
bae81fba05
|
@ -1772,17 +1772,17 @@ CheckBufferOverrun::ArrayInfo::ArrayInfo()
|
|||
{
|
||||
}
|
||||
|
||||
CheckBufferOverrun::ArrayInfo::ArrayInfo(const Variable *var, const SymbolDatabase * symbolDatabase, const unsigned int forcedeclid)
|
||||
CheckBufferOverrun::ArrayInfo::ArrayInfo(const Variable *var, const SymbolDatabase * symDb, const unsigned int forcedeclid)
|
||||
: _varname(var->name()), _declarationId((forcedeclid == 0U) ? var->declarationId() : forcedeclid)
|
||||
{
|
||||
for (std::size_t i = 0; i < var->dimensions().size(); i++)
|
||||
_num.push_back(var->dimension(i));
|
||||
if (var->typeEndToken()->str() == "*")
|
||||
_element_size = symbolDatabase->sizeOfType(var->typeEndToken());
|
||||
_element_size = symDb->sizeOfType(var->typeEndToken());
|
||||
else if (var->typeStartToken()->str() == "struct")
|
||||
_element_size = 100;
|
||||
else {
|
||||
_element_size = symbolDatabase->sizeOfType(var->typeEndToken());
|
||||
_element_size = symDb->sizeOfType(var->typeEndToken());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue