parent
9838bfa79f
commit
de4a33167d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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"))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue