save location of using directive (not used yet)

This commit is contained in:
Robert Reif 2011-03-13 21:01:33 -04:00
parent 07fe361964
commit 836fadcb6a
2 changed files with 13 additions and 1 deletions

View File

@ -101,6 +101,15 @@ SymbolDatabase::SymbolDatabase(const Tokenizer *tokenizer, const Settings *setti
continue; continue;
} }
// using namespace
else if (Token::Match(tok, "using namespace %type% ;|::"))
{
// save location
scope->usingList.push_back(tok);
tok = tok->tokAt(3);
}
else else
{ {
// check for end of space // check for end of space

View File

@ -400,7 +400,10 @@ public:
AccessControl access; AccessControl access;
unsigned int numConstructors; unsigned int numConstructors;
NeedInitialization needInitialization; NeedInitialization needInitialization;
Scope *functionOf; // class/struct this function belongs to std::list<const Token *> usingList;
// function specific fields
Scope *functionOf; // scope this function belongs to
bool isClassOrStruct() const bool isClassOrStruct() const
{ {