Skip to content
Snippets Groups Projects
Commit 45448ce5 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

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

parent f14e9834
No related branches found
No related tags found
No related merge requests found
...@@ -573,6 +573,14 @@ protected: ...@@ -573,6 +573,14 @@ protected:
// sizeof (a) // sizeof (a)
// `a' can be a typeid or a nested-expression. // `a' can be a typeid or a nested-expression.
return false; 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;
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment