[PATCH] Last-chance diagnostics for incomplete types
nlewycky at google.com
Mon Jul 22 17:06:59 PDT 2013
On 12 July 2013 17:01, Luke Zarko <zarko at google.com> wrote:
> Ping--any opinions on this or thoughts on better ways to do it?
>From the peanut gallery! I fundamentally like the direction this is going.
+ /// \brief Maybe produce a diagnostic note if this class can find a
+ /// way to get at the complete definition for T.
Is this clearer?: "Produces a diagnostic note if the external source
contains a complete definition for T."
+ for(size_t i = 0; i < Sources.size(); ++i)
Space after 'for'. Also, hoist out the computation of Sources.size(). See
What prevents us from emitting the same diagnostic note twice? What if two
external sources both contain full definitions of the type (for instance,
modules X and Y both include module Z which defines the type, but they
don't expose Z's contents to their users)?
\ No newline at end of file
Please keep a newline at the end of MultiplexExternalSemaSource.cpp.
On Tue, Jul 9, 2013 at 3:45 PM, Luke Zarko <zarko at google.com> wrote:
> > This patch adds a method to ExternalSemaSource to allow it to produce
> > diagnostics when an incomplete type was detected where a complete type
> > was required. For example, one could define an ExternalSemaSource that
> > scans a repository for headers providing a missing definition.
> > The purpose of the MaybeDiagnoseMissingCompleteType method differs
> > from that of the existing ExternalASTSource::CompleteType method. The
> > former is invoked to diagnose a single SourceLocation-ed
> > missing-complete-type site where there is no chance for recovery. The
> > latter may be called in the course of compiling a valid source file
> > with some of its definitions available in external but otherwise
> > available locations.
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits