astyle formatting
This commit is contained in:
parent
0c66f47fe0
commit
e50f7a3e09
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue