Revert 'using' changes as it was until some time ago.

This commit is contained in:
Edoardo Prezioso 2012-01-02 19:27:32 +01:00
parent cb22e04a36
commit 94a2287370
2 changed files with 5 additions and 9 deletions

View File

@ -1485,13 +1485,6 @@ void Scope::getVariableList()
continue;
}
//skip 'using (namespace)' keyword
else if (tok->str() == "using") {
if (tok->next() && tok->next()->str() == "namespace")
tok = tok->next();
continue;
}
// Search for start of statement..
else if (tok->previous() && !Token::Match(tok->previous(), ";|{|}|public:|protected:|private:"))
continue;

View File

@ -3647,12 +3647,15 @@ void Tokenizer::setVarId()
if (tok->str() == "unsigned")
tok = tok->next();
if (tok->str() == "using") {
if (tok->next() && tok->next()->str() == "namespace")
if (Token::Match(tok, "using namespace %type% ;")) {
tok = tok->next();
continue;
}
if (tok->str() == "using") {
continue;
}
if (Token::Match(tok, "goto %any% ;"))
continue;