Such implicitly declared functions behave as if the enclosing block contained the declaration
extern int name() (C90, 6.3.3.2 Function calls) , thus their names should have block scope
(C90, 6.1.2.1 Scope of identifiers) .
This patch fixes https://bugs.llvm.org/show_bug.cgi?id=33224
This seems to miss quite a lot of places that introduce compound statement scopes. (Search for callers of ParseCompundStatementBody and callers of the 2-argument form of ParseCompoundStatement for those.)