This commit is contained in:
parent
e5572835c0
commit
3a8d9b8c87
|
@ -6419,11 +6419,17 @@ void SymbolDatabase::setValueType(Token* tok, const ValueType& valuetype, Source
|
|||
}
|
||||
} else if (ternary) {
|
||||
if (vt1->pointer != 0U && vt2 && vt2->pointer == 0U) {
|
||||
if (vt2->isPrimitive())
|
||||
setValueType(parent, *vt1);
|
||||
else
|
||||
setValueType(parent, *vt2);
|
||||
return;
|
||||
}
|
||||
|
||||
if (vt1->pointer == 0U && vt2 && vt2->pointer != 0U) {
|
||||
if (vt1->isPrimitive())
|
||||
setValueType(parent, *vt2);
|
||||
else
|
||||
setValueType(parent, *vt1);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -152,6 +152,11 @@ private:
|
|||
" std::array<double, 1> a = S::g(S::E::E0);\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
check("char* f(char* p) {\n"
|
||||
" return p ? p : 0;\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void structmember() {
|
||||
|
|
Loading…
Reference in New Issue