From 94a2287370c56bf9b76bb68bb0f66f09a87105eb Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Mon, 2 Jan 2012 19:27:32 +0100 Subject: [PATCH] Revert 'using' changes as it was until some time ago. --- lib/symboldatabase.cpp | 7 ------- lib/tokenize.cpp | 7 +++++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 2f242cb9f..0428e6551 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -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; diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index d767463e9..7fee9a985 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -3647,9 +3647,12 @@ void Tokenizer::setVarId() if (tok->str() == "unsigned") tok = tok->next(); + if (Token::Match(tok, "using namespace %type% ;")) { + tok = tok->next(); + continue; + } + if (tok->str() == "using") { - if (tok->next() && tok->next()->str() == "namespace") - tok = tok->next(); continue; }