Tokenizer::simplifyTemplates: Broke out handling for 'template<>..'

This commit is contained in:
Daniel Marjamäki 2011-02-12 19:43:33 +01:00
parent 518a495334
commit 654116af61
2 changed files with 17 additions and 1 deletions

View File

@ -2548,7 +2548,7 @@ static void removeTemplates(Token *tok)
}
}
void Tokenizer::simplifyTemplates()
std::set<std::string> Tokenizer::simplifyTemplatesExpandSpecialized()
{
std::set<std::string> expandedtemplates;
@ -2614,6 +2614,15 @@ void Tokenizer::simplifyTemplates()
}
}
return expandedtemplates;
}
void Tokenizer::simplifyTemplates()
{
std::set<std::string> expandedtemplates;
expandedtemplates = simplifyTemplatesExpandSpecialized();
// Locate templates..
std::list<Token *> templates;
for (Token *tok = _tokens; tok; tok = tok->next())

View File

@ -25,6 +25,7 @@
#include <string>
#include <map>
#include <vector>
#include <set>
class Token;
class ErrorLogger;
@ -395,6 +396,12 @@ public:
*/
void simplifyTemplates();
/**
* Expand specialized templates : "template<>.."
* \return names of expanded templates
*/
std::set<std::string> simplifyTemplatesExpandSpecialized();
/**
* Used after simplifyTemplates to perform a little cleanup.
* Sometimes the simplifyTemplates isn't fully successful and then