Don't search for undefined types in ambiguous sizeof expressions.

This commit is contained in:
Roberto Raggi
2009-07-06 17:29:57 +02:00
parent f14e98342c
commit 45448ce5d5

View File

@@ -573,6 +573,14 @@ protected:
// sizeof (a)
// `a' can be a typeid or a nested-expression.
return false;
} else if (type_id->declarator
&& type_id->declarator->postfix_declarators
&& ! type_id->declarator->postfix_declarators->next
&& type_id->declarator->postfix_declarators->asArrayDeclarator() != 0) {
// this sizeof expression is ambiguos, e.g.
// sizeof(a[10])
// `a' can be a typeid or an expression.
return false;
}
}
}