astyle formatting

[ci skip]
This commit is contained in:
Daniel Marjamäki 2019-05-21 10:43:33 +02:00
parent 9838bfa79f
commit de4a33167d
4 changed files with 5 additions and 5 deletions

View File

@ -2825,7 +2825,7 @@ static bool isVariableExpression(const Token* tok)
if (Token::Match(tok, "%var%"))
return true;
if (Token::simpleMatch(tok, "."))
return isVariableExpression(tok->astOperand1()) &&
return isVariableExpression(tok->astOperand1()) &&
isVariableExpression(tok->astOperand2());
return false;
}

View File

@ -7779,7 +7779,7 @@ bool Tokenizer::simplifyRedundantParentheses()
if (tok->str() != "(")
continue;
if (isCPP() && Token::simpleMatch(tok->previous(), "} (") &&
if (isCPP() && Token::simpleMatch(tok->previous(), "} (") &&
Token::Match(tok->previous()->link()->previous(), "%name%|> {"))
continue;

View File

@ -289,13 +289,13 @@ private:
void cpp11init3() {
check("struct A { void operator()(int); };\n"
"void f() {\n"
"A{}(0);\n"
"A{}(0);\n"
"}\n");
ASSERT_EQUALS("", errout.str());
check("template<class> struct A { void operator()(int); };\n"
"void f() {\n"
"A<int>{}(0);\n"
"A<int>{}(0);\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}

View File

@ -7662,7 +7662,7 @@ private:
"template <bool> using c = int;\n"
"template <bool b> c<b> d;\n"
"template <> struct a<int> {\n"
"template <typename e> constexpr auto g() { d<0 || e::f>; return 0; }\n"
"template <typename e> constexpr auto g() { d<0 || e::f>; return 0; }\n"
"};\n"))
}