Fix the static analysis error: m.isVirtual is a tri-state undefined, true, or "pure", and I didn't take that into account when writing the original NS_OVERRIDE analysis.

This commit is contained in:
Benjamin Smedberg 2009-10-04 14:35:33 -04:00
parent 5760afb9fe
commit 2bb0130dcb
2 changed files with 7 additions and 1 deletions

View File

@ -63,7 +63,7 @@ function signaturesMatch(m1, m2)
if (m1.shortName != m2.shortName)
return false;
if (m1.isVirtual != m2.isVirtual)
if ((!!m1.isVirtual) != (!!m2.isVirtual))
return false;
if (m1.isStatic != m2.isStatic)

View File

@ -2,6 +2,7 @@ class A
{
int a(int, char*);
void c(char);
virtual void d(int) = 0;
};
class B : A
@ -13,3 +14,8 @@ class C : B
{
__attribute__((user("NS_override"))) void c(char);
};
class D : A
{
__attribute__((user("NS_override"))) void d(int);
};