parent
faafd93b89
commit
30e8814ecb
|
@ -1341,6 +1341,8 @@ namespace {
|
||||||
|
|
||||||
for (const auto& p : *pm) {
|
for (const auto& p : *pm) {
|
||||||
const Token* tok = p.first.tok;
|
const Token* tok = p.first.tok;
|
||||||
|
if (!tok)
|
||||||
|
continue;
|
||||||
const ValueFlow::Value& value = p.second;
|
const ValueFlow::Value& value = p.second;
|
||||||
|
|
||||||
if (tok->str() == expr->str() && !astHasExpr(tok, expr->exprId())) {
|
if (tok->str() == expr->str() && !astHasExpr(tok, expr->exprId())) {
|
||||||
|
|
|
@ -7275,6 +7275,17 @@ private:
|
||||||
" if (a && b) {}\n"
|
" if (a && b) {}\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
valueOfTok(code, "a");
|
valueOfTok(code, "a");
|
||||||
|
|
||||||
|
code = "void g(const char* fmt, ...);\n" // #12255
|
||||||
|
"void f(const char* fmt, const char* msg) {\n"
|
||||||
|
" const char* p = msg;\n"
|
||||||
|
" g(\"%s\", msg);\n"
|
||||||
|
"}\n"
|
||||||
|
"void g(const char* fmt, ...) {\n"
|
||||||
|
" const char* q = fmt;\n"
|
||||||
|
" if (*q > 0 && *q < 100) {}\n"
|
||||||
|
"}\n";
|
||||||
|
valueOfTok(code, "&&");
|
||||||
}
|
}
|
||||||
|
|
||||||
void valueFlowHang() {
|
void valueFlowHang() {
|
||||||
|
|
Loading…
Reference in New Issue