astyle formatting
This commit is contained in:
parent
8828619855
commit
d64aea90fa
|
@ -50,7 +50,8 @@ namespace {
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
static bool isSizeOfEtc(const Token *tok) {
|
static bool isSizeOfEtc(const Token *tok)
|
||||||
|
{
|
||||||
return Token::Match(tok, "sizeof|typeof|offsetof|decltype|__typeof__ (");
|
return Token::Match(tok, "sizeof|typeof|offsetof|decltype|__typeof__ (");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1530,7 +1531,7 @@ void CheckUninitVar::valueFlowUninit()
|
||||||
if (ispointer && v->indirect == 1 && !deref)
|
if (ispointer && v->indirect == 1 && !deref)
|
||||||
continue;
|
continue;
|
||||||
if (isarray && !deref)
|
if (isarray && !deref)
|
||||||
continue;
|
continue;
|
||||||
uninitderef = deref && v->indirect == 0;
|
uninitderef = deref && v->indirect == 0;
|
||||||
const bool isleaf = isLeafDot(tok) || uninitderef;
|
const bool isleaf = isLeafDot(tok) || uninitderef;
|
||||||
if (Token::Match(tok->astParent(), ". %var%") && !isleaf)
|
if (Token::Match(tok->astParent(), ". %var%") && !isleaf)
|
||||||
|
|
|
@ -5119,8 +5119,8 @@ private:
|
||||||
tok("template <class T> struct A { T x; };\n"
|
tok("template <class T> struct A { T x; };\n"
|
||||||
"A<int[2]> y;"));
|
"A<int[2]> y;"));
|
||||||
|
|
||||||
// Previously resulted in:
|
// Previously resulted in:
|
||||||
// test.cpp:2:33: error: Syntax Error: AST broken, binary operator '>' doesn't have two operands. [internalAstError]
|
// test.cpp:2:33: error: Syntax Error: AST broken, binary operator '>' doesn't have two operands. [internalAstError]
|
||||||
ASSERT_EQUALS("struct A<B<int>[]> ; "
|
ASSERT_EQUALS("struct A<B<int>[]> ; "
|
||||||
"struct B<B<int>> ; "
|
"struct B<B<int>> ; "
|
||||||
"struct C<B<int>> ; "
|
"struct C<B<int>> ; "
|
||||||
|
|
Loading…
Reference in New Issue