Skip to content

Commit 5f4ab8b

Browse files
committed
Format
1 parent 4d9dacf commit 5f4ab8b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

lib/astutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ bool isTemporary(const Token* tok, const Library* library, bool unknown)
440440
return isTemporary(tok->astOperand2(), library);
441441
if (tok->isCast() || (tok->isCpp() && isCPPCast(tok)))
442442
return isTemporary(tok->astOperand2(), library);
443-
if(findLambdaEndToken(tok) != nullptr)
443+
if (findLambdaEndToken(tok) != nullptr)
444444
return true;
445445
if (Token::Match(tok, ".|[|++|--|%name%|%assign%"))
446446
return false;

test/testautovariables.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4221,7 +4221,9 @@ class TestAutoVariables : public TestFixture {
42214221
" auto y = f([](auto x) { return 1; });\n"
42224222
" return y();\n"
42234223
"}\n");
4224-
ASSERT_EQUALS("[test.cpp:3:12] -> [test.cpp:2:13] -> [test.cpp:4:16] -> [test.cpp:8:16] -> [test.cpp:8:16] -> [test.cpp:9:12]: (error) Using object that is a temporary. [danglingTemporaryLifetime]\n", errout_str());
4224+
ASSERT_EQUALS(
4225+
"[test.cpp:3:12] -> [test.cpp:2:13] -> [test.cpp:4:16] -> [test.cpp:8:16] -> [test.cpp:8:16] -> [test.cpp:9:12]: (error) Using object that is a temporary. [danglingTemporaryLifetime]\n",
4226+
errout_str());
42254227
}
42264228

42274229
void danglingLifetimeBorrowedMembers()

0 commit comments

Comments
 (0)