parent
03026c7304
commit
7a79366ba0
|
@ -2539,7 +2539,7 @@ bool isVariableChanged(const Token *tok, int indirect, const Settings *settings,
|
||||||
|
|
||||||
// Check addressof
|
// Check addressof
|
||||||
if (tok2->astParent() && tok2->astParent()->isUnaryOp("&")) {
|
if (tok2->astParent() && tok2->astParent()->isUnaryOp("&")) {
|
||||||
if (isVariableChanged(tok2->astParent(), indirect + 1, settings, depth - 1))
|
if (isVariableChanged(tok2->astParent(), indirect + 1, settings, cpp, depth - 1))
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
// If its already const then it cant be modified
|
// If its already const then it cant be modified
|
||||||
|
|
|
@ -7165,6 +7165,12 @@ private:
|
||||||
" (*printf)(\"%s %i\", strerror(errno), b ? 0 : 1);\n"
|
" (*printf)(\"%s %i\", strerror(errno), b ? 0 : 1);\n"
|
||||||
"};\n";
|
"};\n";
|
||||||
valueOfTok(code, "?");
|
valueOfTok(code, "?");
|
||||||
|
|
||||||
|
code = "void f(int i) {\n" // #11914
|
||||||
|
" int& r = i;\n"
|
||||||
|
" int& q = (&r)[0];\n"
|
||||||
|
"}\n";
|
||||||
|
valueOfTok(code, "&");
|
||||||
}
|
}
|
||||||
|
|
||||||
void valueFlowHang() {
|
void valueFlowHang() {
|
||||||
|
|
Loading…
Reference in New Issue