Fixed #542 (Tokenizer: allow numbers in templates parameters)
http://sourceforge.net/apps/trac/cppcheck/ticket/542
This commit is contained in:
parent
365432e6ef
commit
0445edf6fe
|
@ -759,7 +759,7 @@ void Tokenizer::setVarId()
|
|||
while (Token::Match(tok2, "%var% ::"))
|
||||
tok2 = tok2->tokAt(2);
|
||||
|
||||
while (tok2 && (tok2->isName() || tok2->str() == "*" || tok2->str() == ","))
|
||||
while (tok2 && (tok2->isName() || tok2->isNumber() || tok2->str() == "*" || tok2->str() == ","))
|
||||
tok2 = tok2->next();
|
||||
|
||||
if (Token::Match(tok2, "> %var%"))
|
||||
|
|
|
@ -1300,6 +1300,7 @@ private:
|
|||
"std::list<boost::wave::token_id> tokens;\n"
|
||||
"static std::vector<CvsProcess*> ex1;\n"
|
||||
"extern std::vector<CvsProcess*> ex2;\n"
|
||||
"std::map<int, 1> m;\n"
|
||||
);
|
||||
|
||||
// tokenize..
|
||||
|
@ -1319,6 +1320,7 @@ private:
|
|||
"6: std :: list < boost :: wave :: token_id > tokens@6 ;\n"
|
||||
"7: static std :: vector < CvsProcess * > ex1@7 ;\n"
|
||||
"8: extern std :: vector < CvsProcess * > ex2@8 ;\n"
|
||||
"9: std :: map < int , 1 > m@9 ;\n"
|
||||
);
|
||||
|
||||
ASSERT_EQUALS(expected, actual);
|
||||
|
|
Loading…
Reference in New Issue