Astyle run.

This commit is contained in:
orbitcowboy 2017-03-21 14:22:28 +01:00
parent fb2b29dc7d
commit a7f1188151
2 changed files with 6 additions and 7 deletions

View File

@ -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% (")) {

View File

@ -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() {