Fix 10950: Crash on function declaration (#3979)
* Fix 10950: Crash on function declaration * Format
This commit is contained in:
parent
b73aeeda0e
commit
bb640c4879
|
@ -7649,6 +7649,8 @@ static void valueFlowContainerSize(TokenList* tokenlist,
|
|||
for (const Variable *var : symboldatabase->variableList()) {
|
||||
if (!var)
|
||||
continue;
|
||||
if (!var->scope() || !var->scope()->bodyEnd || !var->scope()->bodyStart)
|
||||
continue;
|
||||
if (!var->valueType() || !var->valueType()->container)
|
||||
continue;
|
||||
if (!astIsContainer(var->nameToken()))
|
||||
|
|
|
@ -6434,6 +6434,12 @@ private:
|
|||
" std::cout << (void*)(std::shared_ptr<int>{ g() }.get());\n"
|
||||
"}\n";
|
||||
valueOfTok(code, ".");
|
||||
|
||||
code = "class T;\n"
|
||||
"struct S {\n"
|
||||
" void f(std::array<T*, 2>& a);\n"
|
||||
"};\n";
|
||||
valueOfTok(code, "a");
|
||||
}
|
||||
|
||||
void valueFlowHang() {
|
||||
|
|
Loading…
Reference in New Issue