Improve varId and getVariableList filter, related to previous commit.
This commit is contained in:
parent
8c68b811f3
commit
0d3bf5340d
|
@ -1485,6 +1485,12 @@ void Scope::getVariableList()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else if (Token::Match(tok, "using namespace| %type% ;")) {
|
||||||
|
tok = tok->tokAt(2);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Search for start of statement..
|
// Search for start of statement..
|
||||||
else if (tok->previous() && !Token::Match(tok->previous(), ";|{|}|public:|protected:|private:"))
|
else if (tok->previous() && !Token::Match(tok->previous(), ";|{|}|public:|protected:|private:"))
|
||||||
continue;
|
continue;
|
||||||
|
@ -1493,9 +1499,6 @@ void Scope::getVariableList()
|
||||||
else if (Token::Match(tok, "goto %var% ;")) {
|
else if (Token::Match(tok, "goto %var% ;")) {
|
||||||
tok = tok->tokAt(2);
|
tok = tok->tokAt(2);
|
||||||
continue;
|
continue;
|
||||||
} else if (check->_tokenizer->isCSharp() && Token::Match(tok, "using %var% ;")) {
|
|
||||||
tok = tok->tokAt(2);
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tok = checkVariable(tok, varaccess);
|
tok = checkVariable(tok, varaccess);
|
||||||
|
|
|
@ -3655,15 +3655,11 @@ void Tokenizer::setVarId()
|
||||||
if (tok->str() == "unsigned")
|
if (tok->str() == "unsigned")
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
|
|
||||||
if (Token::Match(tok, "using namespace %type% ;")) {
|
if (Token::Match(tok, "using namespace| %type% ;")) {
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tok->str() == "using") {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Token::Match(tok, "goto %any% ;"))
|
if (Token::Match(tok, "goto %any% ;"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue