Skip to content

Commit 4dbe469

Browse files
author
Aaron Danen
committed
formatting
1 parent 4957344 commit 4dbe469

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

lib/checkleakautovar.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static const Token * isFunctionCall(const Token * nameToken)
279279
* @param token on the LHS of a function call
280280
* @return opening parenthesis token or nullptr if not a function call
281281
*/
282-
static const Token * isAnonymousFunctionCall(const Token * tok)
282+
static const Token * isAnonymousFunctionCall(const Token * tok)
283283
{
284284
// match one of the supported LHS patterns
285285
if (tok->previous()->str() == "(" && !tok->previous()->isBinaryOp() && tok->linkAt(-1)) {
@@ -829,13 +829,13 @@ bool CheckLeakAutoVarImpl::checkScope(const Token * const startToken,
829829
}
830830

831831
continue;
832-
833-
// top level call to an anonymous function
832+
833+
// top level call to an anonymous function
834834
} else if (const Token *openingPar = isAnonymousFunctionCall(tok)) {
835835
functionCall(nullptr, openingPar, varInfo, VarInfo::AllocInfo(0, VarInfo::NOALLOC), nullptr);
836836
tok = openingPar->link();
837837

838-
// goto => weird execution path
838+
// goto => weird execution path
839839
} else if (tok->str() == "goto") {
840840
varInfo.clear();
841841
return false;

test/testleakautovar.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,16 +1914,16 @@ class TestLeakAutoVar : public TestFixture {
19141914
void anonymousFunctionCall1() { // #14990
19151915
// function pointer
19161916
check("void f(void (*fptr)(void *)) {\n"
1917-
"void *buf = malloc(1);\n"
1918-
"(*fptr)(buf);\n"
1917+
"void *buf = malloc(1);\n"
1918+
"(*fptr)(buf);\n"
19191919
"}\n");
19201920
ASSERT_EQUALS("", errout_str());
1921-
1921+
19221922
// lambda
19231923
check("void f() {\n"
1924-
"auto x = [](void *ptr) { g(ptr) };\n"
1925-
"void *p = malloc(1);\n"
1926-
"(x)(p);\n"
1924+
"auto x = [](void *ptr) { g(ptr) };\n"
1925+
"void *p = malloc(1);\n"
1926+
"(x)(p);\n"
19271927
"}\n");
19281928
ASSERT_EQUALS("", errout_str());
19291929

@@ -1941,9 +1941,9 @@ class TestLeakAutoVar : public TestFixture {
19411941
" foo(get_function()(buf));\n"
19421942
"}\n");
19431943
ASSERT_EQUALS("[test.c:3:29]: (information) --check-library: Function foo() should have <noreturn> configuration [checkLibraryNoReturn]\n"
1944-
"[test.c:4:1]: (information) --check-library: Function foo() should have <use>/<leak-ignore> configuration [checkLibraryUseIgnore]\n",
1944+
"[test.c:4:1]: (information) --check-library: Function foo() should have <use>/<leak-ignore> configuration [checkLibraryUseIgnore]\n",
19451945
errout_str());
1946-
1946+
19471947
// Function returning a function pointer, passed as an arg to another
19481948
// function returning a function pointer
19491949
check("void f() {\n"

0 commit comments

Comments
 (0)