parent
ed12b4dc44
commit
91d0f0fee0
|
@ -446,8 +446,8 @@ static bool iscast(const Token *tok)
|
||||||
if (tok->previous() && tok->previous()->isName() && tok->previous()->str() != "return")
|
if (tok->previous() && tok->previous()->isName() && tok->previous()->str() != "return")
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Token::simpleMatch(tok->previous(), ">") && tok->previous()->link())
|
if (Token::simpleMatch(tok->previous(), ">") && tok->previous()->link())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Token::Match(tok, "( (| typeof (") && Token::Match(tok->link(), ") %num%"))
|
if (Token::Match(tok, "( (| typeof (") && Token::Match(tok->link(), ") %num%"))
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -8242,8 +8242,8 @@ private:
|
||||||
ASSERT_EQUALS("a(3==", testAst("a<int>()==3"));
|
ASSERT_EQUALS("a(3==", testAst("a<int>()==3"));
|
||||||
ASSERT_EQUALS("ab(== f(", testAst("a == b<c>(); f();"));
|
ASSERT_EQUALS("ab(== f(", testAst("a == b<c>(); f();"));
|
||||||
ASSERT_EQUALS("static_casta(i[", testAst("; static_cast<char*>(a)[i];")); // #6203
|
ASSERT_EQUALS("static_casta(i[", testAst("; static_cast<char*>(a)[i];")); // #6203
|
||||||
ASSERT_EQUALS("reinterpret_castreinterpret_castptr(123&(",
|
ASSERT_EQUALS("reinterpret_castreinterpret_castptr(123&(",
|
||||||
testAst(";reinterpret_cast<void*>(reinterpret_cast<unsigned>(ptr) & 123);")); // #7253
|
testAst(";reinterpret_cast<void*>(reinterpret_cast<unsigned>(ptr) & 123);")); // #7253
|
||||||
|
|
||||||
// This two unit tests were added to avoid a crash. The actual correct AST result for non-executable code has not been determined so far.
|
// This two unit tests were added to avoid a crash. The actual correct AST result for non-executable code has not been determined so far.
|
||||||
ASSERT_EQUALS("Cpublica::b:::", testAst("class C : public ::a::b<bool> { };"));
|
ASSERT_EQUALS("Cpublica::b:::", testAst("class C : public ::a::b<bool> { };"));
|
||||||
|
|
Loading…
Reference in New Issue