Astyle run.
This commit is contained in:
parent
fb2b29dc7d
commit
a7f1188151
|
@ -724,11 +724,10 @@ int TemplateSimplifier::getTemplateNamePosition(const Token *tok)
|
|||
(Token::Match(tok, "> %type% %type% <") && Token::Match(tok->linkAt(3), "> :: %type% ("))) {
|
||||
namepos = 2 + (Token::Match(tok, "> %type% %type%"));
|
||||
const Token *end = tok->linkAt(namepos);
|
||||
for(const Token *tok2 = tok->tokAt(namepos) ; tok2 != end ; tok2 = tok2->next())
|
||||
for (const Token *tok2 = tok->tokAt(namepos) ; tok2 != end ; tok2 = tok2->next())
|
||||
++namepos;
|
||||
namepos += 2;
|
||||
}
|
||||
else if (Token::Match(tok, "> %type% *|&| %type% :: %type% (")) {
|
||||
} else if (Token::Match(tok, "> %type% *|&| %type% :: %type% (")) {
|
||||
namepos = 4;
|
||||
starAmpPossiblePosition = 2;
|
||||
} else if (Token::Match(tok, "> %type% %type% *|&| %type% :: %type% (")) {
|
||||
|
|
|
@ -1373,13 +1373,13 @@ private:
|
|||
"template<class T> const unsigned A::B::foo() { return 0; }", 25));
|
||||
// Template class member
|
||||
ASSERT_EQUALS(6, templateNamePositionHelper("template<class T> class A { A(); }; "
|
||||
"template<class T> A<T>::A() {}", 18));
|
||||
"template<class T> A<T>::A() {}", 18));
|
||||
ASSERT_EQUALS(8, templateNamePositionHelper("template<class T, class U> class A { A(); }; "
|
||||
"template<class T, class U> A<T, U>::A() {}", 24));
|
||||
"template<class T, class U> A<T, U>::A() {}", 24));
|
||||
ASSERT_EQUALS(7, templateNamePositionHelper("template<class T> class A { unsigned foo(); }; "
|
||||
"template<class T> unsigned A<T>::foo() { return 0; }", 19));
|
||||
"template<class T> unsigned A<T>::foo() { return 0; }", 19));
|
||||
ASSERT_EQUALS(9, templateNamePositionHelper("template<class T, class U> class A { unsigned foo(); }; "
|
||||
"template<class T, class U> unsigned A<T, U>::foo() { return 0; }", 25));
|
||||
"template<class T, class U> unsigned A<T, U>::foo() { return 0; }", 25));
|
||||
}
|
||||
|
||||
void expandSpecialized() {
|
||||
|
|
Loading…
Reference in New Issue