astyle formatting

This commit is contained in:
Daniel Marjamäki 2021-06-30 20:27:35 +02:00
parent 0c66f47fe0
commit e50f7a3e09
1 changed files with 16 additions and 16 deletions

View File

@ -2242,23 +2242,23 @@ private:
} }
void nullpointer72() { // #10215 void nullpointer72() { // #10215
check("int test() {\n" check("int test() {\n"
"int* p0 = nullptr, *p1 = nullptr;\n" "int* p0 = nullptr, *p1 = nullptr;\n"
"getFoo(p0);\n" "getFoo(p0);\n"
"getBar(p1);\n" "getBar(p1);\n"
"if (!(p0 != nullptr && p1 != nullptr))\n" "if (!(p0 != nullptr && p1 != nullptr))\n"
"return {};\n" "return {};\n"
"return *p0 + *p1;\n" "return *p0 + *p1;\n"
"}\n", true /*inconclusive*/); "}\n", true /*inconclusive*/);
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
check("int test2() {\n" check("int test2() {\n"
"int* p0 = nullptr; \n" "int* p0 = nullptr; \n"
"if (!(getBaz(p0) && p0 != nullptr))\n" "if (!(getBaz(p0) && p0 != nullptr))\n"
"return 0;\n" "return 0;\n"
"return *p0;\n" "return *p0;\n"
"}\n", true /*inconclusive*/); "}\n", true /*inconclusive*/);
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }
void nullpointer73() { void nullpointer73() {