Skip to content

Commit 7d63bde

Browse files
committed
astyle formatting
[ci skip]
1 parent cb509f1 commit 7d63bde

6 files changed

Lines changed: 36 additions & 36 deletions

File tree

lib/checkstl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -831,10 +831,10 @@ void CheckStl::invalidContainer()
831831
return false;
832832
if (info.tok->varId() == skipVarId)
833833
return false;
834-
if (info.tok->variable()->isReference() &&
835-
!isVariableDecl(info.tok) &&
834+
if (info.tok->variable()->isReference() &&
835+
!isVariableDecl(info.tok) &&
836836
reaches(info.tok->variable()->nameToken(), tok, library, nullptr)) {
837-
837+
838838
ErrorPath ep;
839839
bool addressOf = false;
840840
const Variable* var = getLifetimeVariable(info.tok, ep, &addressOf);

lib/checkuninitvar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,7 @@ void CheckUninitVar::valueFlowUninit()
13641364
while (Token::simpleMatch(nextTok->astParent(), "."))
13651365
nextTok = nextTok->astParent();
13661366
nextTok = nextAfterAstRightmostLeaf(nextTok);
1367-
if(nextTok == scope.bodyEnd)
1367+
if (nextTok == scope.bodyEnd)
13681368
break;
13691369
tok = nextTok ? nextTok : tok;
13701370
}

test/testbool.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,14 +1040,14 @@ class TestBool : public TestFixture {
10401040
}
10411041

10421042
void comparisonOfBoolWithInt9() { // #9304
1043-
check("bool f(int a, bool b)\n"
1044-
"{\n"
1045-
" if ((a == 0 ? false : true) != b) {\n"
1046-
" b = !b;\n"
1047-
" }\n"
1048-
" return b;\n"
1049-
"}");
1050-
ASSERT_EQUALS("", errout.str());
1043+
check("bool f(int a, bool b)\n"
1044+
"{\n"
1045+
" if ((a == 0 ? false : true) != b) {\n"
1046+
" b = !b;\n"
1047+
" }\n"
1048+
" return b;\n"
1049+
"}");
1050+
ASSERT_EQUALS("", errout.str());
10511051
}
10521052

10531053

test/testclass.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6695,11 +6695,11 @@ class TestClass : public TestFixture {
66956695

66966696
// don't warn if some other instance's members are assigned to
66976697
checkInitializationListUsage("class C {\n"
6698-
"public:\n"
6699-
" C(C& c) : m_i(c.m_i) { c.m_i = (Foo)-1; }\n"
6700-
"private:\n"
6701-
" Foo m_i;\n"
6702-
"};");
6698+
"public:\n"
6699+
" C(C& c) : m_i(c.m_i) { c.m_i = (Foo)-1; }\n"
6700+
"private:\n"
6701+
" Foo m_i;\n"
6702+
"};");
67036703
ASSERT_EQUALS("", errout.str());
67046704
}
67056705

test/testsymboldatabase.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7079,17 +7079,17 @@ class TestSymbolDatabase: public TestFixture {
70797079
void incomplete_type() {
70807080
GET_SYMBOL_DB("template<class _Ty,\n"
70817081
" class _Alloc = std::allocator<_Ty>>\n"
7082-
" class SLSurfaceLayerData\n"
7083-
" : public _Vector_alloc<_Vec_base_types<_Ty, _Alloc>>\n"
7084-
"{ // varying size array of values\n"
7085-
"\n"
7086-
" using reverse_iterator = _STD reverse_iterator<iterator>;\n"
7087-
" using const_reverse_iterator = _STD reverse_iterator<const_iterator>;\n"
7088-
" const_reverse_iterator crend() const noexcept\n"
7089-
" { // return iterator for end of reversed nonmutable sequence\n"
7090-
" return (rend());\n"
7091-
" }\n"
7092-
"};");
7082+
" class SLSurfaceLayerData\n"
7083+
" : public _Vector_alloc<_Vec_base_types<_Ty, _Alloc>>\n"
7084+
"{ // varying size array of values\n"
7085+
"\n"
7086+
" using reverse_iterator = _STD reverse_iterator<iterator>;\n"
7087+
" using const_reverse_iterator = _STD reverse_iterator<const_iterator>;\n"
7088+
" const_reverse_iterator crend() const noexcept\n"
7089+
" { // return iterator for end of reversed nonmutable sequence\n"
7090+
" return (rend());\n"
7091+
" }\n"
7092+
"};");
70937093
(void)db;
70947094

70957095
ASSERT_EQUALS("", errout.str());

test/testuninitvar.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4443,14 +4443,14 @@ class TestUninitVar : public TestFixture {
44434443
}
44444444

44454445
void uninitvar_nonmember() {
4446-
valueFlowUninit( "struct Foo {\n"
4447-
" int bar;\n"
4448-
"};\n"
4449-
"\n"
4450-
"int main() {\n"
4451-
" Foo* foo;\n"
4452-
" foo.b\n"
4453-
"}\n");
4446+
valueFlowUninit("struct Foo {\n"
4447+
" int bar;\n"
4448+
"};\n"
4449+
"\n"
4450+
"int main() {\n"
4451+
" Foo* foo;\n"
4452+
" foo.b\n"
4453+
"}\n");
44544454
ASSERT_EQUALS("[test.cpp:7]: (error) Uninitialized variable: foo\n", errout.str());
44554455
}
44564456

0 commit comments

Comments
 (0)