This is an archive of the discontinued LLVM Phabricator instance.

Last-chance diagnostics for incomplete types
AbandonedPublic

Authored by zarko on Jul 24 2013, 10:44 AM.

Details

Reviewers
None
Summary

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.

Diff Detail

Event Timeline

jdennett added inline comments.Jul 26 2013, 4:52 PM
include/clang/Sema/ExternalSemaSource.h
185

Nit: "\p T" -> "T" to refer to the parameter T.

include/clang/Sema/MultiplexExternalSemaSource.h
325

Please document this, even if it's just inheriting docs and then saying how this implements the interface.

zarko updated this revision to Unknown Object (????).Jul 30 2013, 2:15 PM

Thanks for the comments! I've also rebased this to trunk.

zarko updated this revision to Unknown Object (????).Aug 12 2013, 2:53 PM

Rebase.

zarko abandoned this revision.Sep 18 2015, 1:48 PM