On Fri, 3 Nov 2017, David Malcolm wrote:

> This currently just works by scanning a hardcoded array of known
> name/header associations, but perhaps in the future could be turned
> into some kind of symbol database so that the compiler could record API
> uses and use that to offer suggestions e.g.
> 
> foo.cc: error: 'myapi::foo' was not declared in this scope
> foo.cc: note: 'myapi::foo" was declared in header 'myapi/private.h'
> (included via 'myapi/public.h') when compiling 'bar.cc'; did you forget to
> '#include "myapi/public.h"'?
> 
> or somesuch.

In such a case it might also be generalized to include an associated 
feature test macro to define ("did you forget to define _GNU_SOURCE?", if 
the relevant header was included but without the feature test macro 
defined).

The C / c-family parts of the present patch are OK.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to